Firstly install node.js or update it to v7
$ npm cache clean -f
$ npm install -g n
$ n stable
gulp install globally
$ npm install -g gulp
and yarn
$ brew update
$ brew install yarn
Run yarn in project directory. Yarn is a better alternative to npm
$ yarn
- run
gulp
- point your browser to localhost:3000
For the development you probably will need flow-typed
$ npm install -g flow-typed
and run in the project directory
$ flow-typed install
gulp
run web app in development modegulp -p
run web app in production modegulp jest
run jest testsgulp jest-watch
continuous test running for TDDgulp eslint
eslintgulp eslint --fix
fix fixable eslint issuesgulp flow
validate the project for type assertion errors
You can simply run the deployment by
$ sh deploy.sh (-f|-s)
or using following commands
gulp build -p
build app for productionnpm test
run all checks and testsnode src/server
start app, remember to set NODE_ENVpm2 start processes.json
run node through pm2
Have a nice day