Code Monkey home page Code Monkey logo

hk's Introduction

![Build Status](https://jenkins.paas.axa-asia.com/buildStatus/icon?job=HK home FE - Master) Coverage Vulnerabilities Bugs code_smells

Home Frontend

Express + React

Getting started

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

Environment Variables

  • 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)

APIs

  • PRICING_API pricing api url
  • SALESFORCE_API salesforce api url

Setup

  • 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

Local Tunnel

You can put your application online via localtunnel

lt --port 3000

Docker Compose

Use docker compose to simulate the production environment

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)

hk's People

Contributors

axachandra avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.