I think i'm misunderstanding nuxt server middleware. I have an api directory with a single file that spins up express and writes records to a mysql database. Everything works as expected running in dev, but after nuxt generate, that endpoint always returns a 404.
Can you use nuxt generate with an internal API that runs on the server? I'd be using axios to hit this endpoint for what it's worth but I doubt that makes a difference.
from Nuxt config:
{
target: static,
serverMiddleware: [{ path: '/api', handler: '~/api/index.js' }]
}