-
-
Notifications
You must be signed in to change notification settings - Fork 657
Closed
Description
Can I create the following route loading?
const Route = use('Route')
const fs = require('fs')
fs.readdirSync(__dirname + '/routes').forEach(function (filename) {
require(__dirname + '/routes/' + filename)(Route)
})where the app folder will have another routes folder containing js modules
EX:
module.exports = function (Route) {
Route.group(() => {
Route.get('/', 'VehicleController.index').as('vehicles.index')
})
.prefix('vehicles')
.middleware('auth')
}Metadata
Metadata
Assignees
Labels
No labels