1.0.4 • Published 7 years ago
express-route-creator v1.0.4
express-route-creator
Custom route creator with middleware for express.
Installation NPM
npm install express-route-creator
Installation GitHub
Clone the repository and install the dependencies
npm install
Follow the start instructions to continue
Usage
import
initialize MiddlewareCreator() and RouteCreator(expressApp, middlewareObj)
setMiddleware(function)
Set middleware for express route group.
Example:
Example multiple middleware functions:
create(route, function)
Create the router
route
define the route, use G/ for a GET route and P/ for a POST routefunction
provide a function for the route
Example:
Start
Run example:
npm start