Additional Nitro Preset Request - Nuxt Generate + Netlify Edge Functions (netlify_gen_edge)
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 11.2k
- Forks
- 899
- Avg merge
- 2d 24m
- Merged PRs (30d)
- 40
Description
Describe the feature
Description
Request for an additional Nitro Netlify Preset which would provide the following (assuming using Nuxt):
- Generate a pre-rendered static site
- Take the contents of the [nuxt-project]/server/api folder and create a netlify edge function that is only responsible for the api calls and not edge rendering the whole Nuxt app
Problem it solves
Honestly, I am just a bit frugal, and would love a method to take advantage of "free" CDN hosting that serves up a statically generated site (SSG), while also being able to create APIs that could hide away api keys or provide additional functionality to the application without rendering the whole app on the edge and having to worry about hitting the generous free limits Netlify provides.
And, to be honest, I may be a luddite here but I really like client side apps and server side rendered apps confuses me sometimes.
Alternative
An alternative would be to just author netlify edge functions in the code base and add a netlify toml file or configure the edge functions right in the file.
That being said, there is something very elegant and portable about the idea of using [nuxt-project]/server/api/** way of doing things and being able to carry that code base to other hosting providers without any rewrites.
Re:willing to help
Absolutely - though honestly I poked around the starer nitro preset repo and got lost pretty quickly - though with a bit of guidance could possibly offer some help here.
Thank you for your consideration.
Additional information
- Would you be willing to help implement this feature?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing Nitro's preset structure and the Nuxt server/api convention described in the request; no specific repository file or test is named. Define how a netlify_gen_edge preset would separate the pre-rendered site from API edge functions, then verify the generated deployment artifacts and configuration.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- nuxt, typescript
- Domain
- backend, cloud
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100