npm.io
1.1.0 • Published 11 years ago

kpipuller

Licence
ISC
Version
1.1.0
Deps
2
Vulns
1
Weekly
0

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