Node.js >= v6 must be installed.
- Running
npm install
in the app's root directory will install everything you need for development.
npm start
will run the app's development server at http://localhost:8080 with hot module reloading.
-
npm test
will run the tests once. -
npm run test:coverage
will run the tests using PhantomJS and produce a coverage report incoverage/
. -
npm run test:browser
will run the tests using Chrome -
npm run test:watch
will run the tests on every change.
- is built in - that said you can run
npm run lint
-
npm run build
creates a production build by default. Produces a 'build' directory. That directory is removed every time.To create a development build, set the
NODE_ENV
environment variable todevelopment
while running this command. -
npm run dev
will run dev with tests watch
docker build -t sgentile/node-web-app .
image will then be listed by docker: docker images
docker run -d -p 8000:8000 -v $(pwd):/usr/src/app --name node-web-app sgentile/node-web-app
docker ps
#print app output
docker logs <container_id>
docker exec -it <container_id> /bin/bash
docker-compose build web docker-compose up web
use http://localhost:8000 for docker
running locally without docker: npm run dev - you'll need a postgres instance