express-route-easy

1.1.3 • Public • Published

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

Readme

Keywords

Package Sidebar

Install

npm i express-route-easy

Weekly Downloads

1

Version

1.1.3

License

MIT

Unpacked Size

2.66 kB

Total Files

3

Last publish

Collaborators

  • william_vilasboas