Netlify and Nuxt3 and Server APIs (getting 404)

I have a nuxt3 app and apis under /server/api

Things work locally.

But when I deploy, it’s giving me 404 on all the apis.

my netlify.toml

[build]
  command = "nuxt generate"
  publish = "dist"

[[redirects]]
  from = "/api/*"
  to = "/.netlify/functions/server/api/:splat"
  status = 200
  force = true

my netlify.toml

[build]
  command = "nuxt generate"
  publish = "dist"

[[redirects]]
  from = "/api/*"
  to = "/.netlify/functions/server/api/:splat"
  status = 200
  force = true

in my nuxt.config.ts, I have

nitro: {
preset: ‘netlify’,

}

I don’t think next generate is meant for a site with API, is it? It’s supposed to produce a static site that cannot use APIs. You should be using nuxt build.

ah!! That solved it! the default netlify for nuxt3 seems to have nuxt generate.

Would be great if there was in the docs variations of what the netlify should be for nuxt3. I searched everywhere and couldnt find much about it.