1.1.0 • Published 9 years ago

kpipuller v1.1.0

Weekly downloads
-
License
ISC
Repository
-
Last release
9 years ago

KPI Runner

Key steps:

  • Setup basic files
  • $ npm install nodemon -g
  • $ npm install babel babel-eslint eslint eslint-config-standard debug request -D
  • run $ node index.js

Production setup

  • $ npm install babel-runtime -S // for production
  • setup compilation for production (see build script in package.json)

Source-map-support

  • add to build script: babel --source-maps inline --optional runtime -d build ./modules
  • install $ npm install source-map-support -S
  • add "require('source-map-support')" to top of build/index.js

Implement Pull API

  • $ npm install request -D
  • Setup module pull.js
  • Create config file

Run app in development mode

  • $ DEBUG=INDEX2,rest nodemon index

Run app in production mode

  • $ nodemon index

Sample Setup API Server

Setup

Modules List

  • express - The application server
  • dotenv - To configure the application
  • body-parser - To parse JSON
  • morgan - To log activity
  • cors - To allow requests from other domains
  • helmet - For a bit of extra security
  • jwt-simple - To issue access tokens
  • moment - A date manipulation library
  • bcrypt - To hash users passwords
  • rethinkdb - database