concatRoutes
Takes an array of route maps and attaches them to a root map as branches
Arguments
Usage
const { methods, router } = require('octoris')
const home = router.route([router.fixed('home')], [
methods.GET(homeHandler),
methods.POST(homeHandler)
])
const account = router.route([router.fixed('account')], [
methods.GET(accHandler)
])
const dash = router.route([router.fixed('dashboard')], [
methods.GET(dashHandler)
])
const main = router.concatRoutes(home, [account, dash])Last updated
Was this helpful?