npm.io
1.1.3 • Published 8 years ago

express-route-easy

Licence
MIT
Version
1.1.3
Deps
1
Size
3 kB
Vulns
0
Weekly
0

express-route-easy

Install

This is a Node.js module available through the npm registry. Installation is done using the npm install command:

$ npm i express-route-easy

Examples

Using with
Using with express
const express = require('express')
const app = express()

const easy = require('express-route-easy')

exports.import = ['/import', async (req, res, next) => {
  res.send({go: 'the force awakens'})
}]

exports.export = ['/export', async (req, res, next) => {
  res.send({go2: 'the force awakens'})
}]

exports.routes = easy([], exports)

app.use('/v1', exports.routes)

License

MIT