You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Using kraken-js middleware config to setup environment specific routes
Defining a factory that returns a router
//in path/to/controllervarexpress=require('express');module.exports=function(){varrouter=express.Router();// path in `require`s below will be relative to this filerouter.get('/login',require('./path/to/loginMiddleware'));router.post('/login',require('./path/to/loginPostMiddleware'));router.get('/some/other/route',require('./path/to/otherRouteMiddleware'));returnrouter;}
Including the factory on your middleware config in <env>.json