1.0.0 • Published 7 years ago

@blended/starter v1.0.0

Weekly downloads
-
License
MIT
Repository
github
Last release
7 years ago

Build Status

starter

A rest API framework on top of koa

Getting started

$ npm install starter --save

Then setup your application as follows:

// app.js
import starter from 'starter'
import models from './api/models'
import env from './config/env'

let app = starter(env)

export default app

if (require.main === module) {
  let port = process.argv[2]
  models(env.db).then(db => {
    app.db = db
    app.run(port)
  })
}

and run it with node app.js [port]. If no port is set the app will run on port 3000.

Developing

$ yarn install

Test

$ yarn test