This is a Node.js module available through the
npm registry. Installation is done using the
npm install
command:
$ npm i express-route-easy
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)