![Build Status](https://jenkins.paas.axa-asia.com/buildStatus/icon?job=HK home FE - Master)
Express + React
Install npm dependencies
npm install
Run with webpack in dev environment
npm run dev
Run with webpack in prod environment
NODE_ENV=production npm start
- PORT port the app runs on default - 3000
- LOG_LEVEL winston log levels ('error', 'warn', 'info') default - 'debug'
- LOG_FILE winston log file, if not specified then it wont create a file
- CONFIG environment of node ('local', 'uat', 'production')
- ENDPOINT the root url path the app is set at, default - 'health-insurance-advisor'
- NODE_TLS_REJECT_UNAUTHORIZED = 0 for local environment when testing UAT urls (salesforce/pricing)
- PRICING_API pricing api url
- SALESFORCE_API salesforce api url
- Open Paas Compliant
- React (Client/Server Side Rendering)
- Redux
- Redux-Saga
- React-router
- Webpack
- scss
- BEM (Block__Element--Modifier)
- eslint
- express (for server)
- React Templates (for server rendering html)
- babel (es6/es7)
- Mocha - jsdom testing (fast and simple)
- mocha test coverage
- Enzyme Testing Framework
- Winston Logging
You can put your application online via localtunnel
lt --port 3000
Use docker compose to simulate the production environment
-
Install Docker https://docker.github.io/engine/installation/
-
Install Docker-Compose
brew install docker-compose
-
Start up docker on your computer
-
Build Docker-Compose
NPM_TOKEN=<NPM TOKEN> docker-compose build
- Start Docker-Compose
NPM_TOKEN=<NPM TOKEN> docker-compose up
- Clean up docker
docker rmi $(docker images -f dangling=true -q)
docker stop $(docker ps -a -q)
docker rm $(docker ps -a -q)