On a local NodeJS server:
- Move all files to NodeJS's working directory
- Initialize the project and install its dependencies:
- Start the server:
- Go to http://localhost:4000
- Create a Docker container from the node image (adding your own local path):
docker run -it --rm --name websockets \
-p 4000:4000 \
-v /path/to/local/files:/usr/src/app \
-w /usr/src/app \
node
- Start an interactive bash shell in the container:
docker exec -it websockets bash
- Initialize the project and install its dependencies:
- Start the server:
- Go to http://localhost:4000