bemu-express-wrapper
v1.0.3
Published
BemuExpress makes it easier to get started with an Express project
Downloads
12
Maintainers
Readme
Bemu Express Wrapper
BemuExpress makes it easier to get started with an Express project
To install run
npm i --save bemu-express-wrapperTo use Simple Event in your project simply do Use the wrapper:
const BemuExpressWrapper = require('bemu-express-wrapper').wrapper;Use the provided route template:
const BemuRoute = require('bemu-express-wrapper').route;This module exports express:
const express = require('bemu-express-wrapper').express;Example usage:
Example usage is provided in ./test/app.js
To create an express app do: const app = BemuExpress([ // First array contains all the middleware of your app RequestLogger ],[ // The second array contains all the root routes BemuExpressRoute('/api', DemoRouter) ]);
To run your app just do:
app.start(5000, ()=>{
// Callback after start
});