Closed wai-lin closed 2 years ago
router.setup() function currently doesn't have basePath to define for.
router.setup()
basePath
This could be solved by defining the base path in createRouter() function as options.
createRouter()
// as prefix const router = createRouter(Router(), { basePath: '/api' }) // as versioning const router_v1 = createRouter(Router(), { basePath: '/v1' }) const router_v2 = createRouter(Router(), { basePath: '/v2' })
Problem
router.setup()
function currently doesn't havebasePath
to define for.Solution
This could be solved by defining the base path in
createRouter()
function as options.