Run:
npm install --save
DEBUG=lvcheng npm start
- Install https://www.docker.com/toolbox
- Run Docker Quickstart Terminal. You will see your default IP in terminal.
- Build image and run container. It run on foreground and print the nodejs log. Add -d for running background.
docker build -t lvcheng .
docker run --name dev -v `pwd`:/app:ro -p 27017:27017 -p 28017:28017 -p 8080:8080 lvcheng
- Browse the web from default IP with port 8080
- To stop or start container:
docker stop dev
docker start dev
- Update source code.
- Check web on browser: http://default IP:8080
- See nodejs log in console.
- Run mongodb server:
docker run -d -p 27017:27017 -p 28017:28017 -e AUTH=no tutum/mongodb
- Update the IP in app.js to be your default IP