module.exports = {
serverMiddleware: [
{ path: '/api', handler: '~/api/index.js' }
]
does not actually pick up requests to /api/* and does not generate a route in .nuxt/router.js.
module.exports = {
serverMiddleware: [
'~/api/index.js'
]
does pick everything up though, however this leaves you to check the url in the middleware and applies to every request which is not efficient - or neat.
"version": "1.0.0-rc6",