See Install Docker Platform or Docker Toolbox
make build
make # or `make cmd`
make run # or `./run.sh`
or specifying customized port ${PORT}
PORT=9999 make run
make test
It is recommended to start a command shell inside the docker container before running the following steps (or actually any command, so that there is no need to install node on a dev box.
make cmd # after that you will be in the container
npm init
npm install --save-dev \
babel-cli babel-preset-es2015 babel-preset-es2015-node5 babel-preset-node5 \
chai chai-as-promised \
eslint babelify browserify vinyl-source-stream \
gulp gulp-eslint gulp-filter gulp-header gulp-jsbeautifier \
gulp-mocha gulp-replace gulp-util \
nodemon request \
rimraf \
mockery istanbul mocha \
sinon-chai sinon \
npm install --save \
body-parser cookie-parser express morgan lodash \
http-status-codes node-fetch uuid4 \
bunyan mysql \
See package.json
for reference.
-
Use the following command to review monitoring/watch process and listening ports
make stat # or `netstat -antp tcp; ps -aef`
-
Upon the API server running, by default port, e.g.
8888
, the endpoint will be athttp://localhost:8888
[ Browser ] <===> [ Nginx ] <===> [ API server ]