@537/service
@537/service ===
Last updated 2 years ago by kiernan .
MIT · Original npm · Tarball · package.json
$ cnpm install @537/service 
SYNC missed versions from official npm registry.

@537/service

build status

A 'set and forget' opinionated implementation of express. Useful for stateless apis.

const service = require('@537/service');
const pck = require('./package.json');
const index_routes = require('routes/index');
const user_routes = require('routes/user');

// sets up all the routes and middleware
const app = service.bootstrap(pck, {
  '/': index_routes,
  '/user': user_routes
});

// do any extra config here....

// binds the express app to a port and starts listening
const server = service.start(app);

// alternatively:

// set up routes and listen on the port right away
const server = service.run(pck, {
  '/': index_routes,
  '/user': user_routes
});

License

MIT

Current Tags

  • 0.1.1                                ...           latest (2 years ago)

9 Versions

  • 0.1.1                                ...           2 years ago
  • 0.1.0                                ...           2 years ago
  • 0.0.8                                ...           2 years ago
  • 0.0.7                                ...           2 years ago
  • 0.0.6                                ...           2 years ago
  • 0.0.5                                ...           2 years ago
  • 0.0.4                                ...           2 years ago
  • 0.0.3                                ...           2 years ago
  • 0.0.2                                ...           2 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 18
Last Day 0
Last Week 0
Last Month 4
Dependencies (8)
Dev Dependencies (7)
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |