- Node.js >=6.3.0
The following environment variables can be used to configure the server:
- NODE_ENV: the environment mode, either- productionor- development(default)
- PORT: the port on which the server runs (default 3000)
- Download RethinkDB
- Start your RethinkDB server by following the steps here
- Go to src/server/database/config.jsand modify the ip field to match your server address
- Start the project : npm run startornpm run watch, then the server will auto create all the required tables for you.
- npm start: start the server
- npm stop: stop the server
- npm run build: build project
- npm run build-prod: build the project for production
- npm run bundle-profile: visualise the bundle dependencies
- npm run clean: clean the project
- npm run watch: watch mode (debug mode enabled, autorebuild, autoreload)
- npm test: run tests
- npm run lint: lint the project
Build the container.  Here, app-ui is used as the container name.
cd app-ui
docker build --build-arg "NODE_ENV=production" -t app-ui .
Run the container:
docker run -it -p 12345:3000 -u "node" -e "NODE_ENV=production" --name "app-ui" app-ui
Notes:
- The -itswitches are necessary to makenoderespond toctrl+cetc. indocker.
- The -pswitch indicates that port 3000 on the container is mapped to port 12345 on the host. Without this switch, the server is inaccessible.
- The -uswitch is used so that a non-root user is used inside the container.
- The -eswitch is used to set environment variables. Alternatively use--env-fileto use a file with the environment variables.
- References:
All files /test will be run by Mocha.  You can npm test to run all tests, or you can run mocha -g specific-test-name (prerequisite: npm install -g mocha) to run specific tests.
Chai is included to make the tests easier to read and write.
- Make sure the tests are passing: npm test
- Make sure the linting is passing: npm run lint
- Bump the version number with npm version, in accordance with semver. Theversioncommand innpmupdates bothpackage.jsonand git tags, but note that it uses avprefix on the tags (e.g.v1.2.3).
- For a bug fix / patch release, run npm version patch.
- For a new feature release, run npm version minor.
- For a breaking API change, run npm version major.
- For a specific version number (e.g. 1.2.3), run npm version 1.2.3.
- Push the release: git push origin --tags