Possibility to render a single route directly to stdout
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
There should be a way to use nitro to generate single pages. One place to run this would be Azure Function that just outputs, using prebuilt nitro files, the desired page output when it is run and then dies out.
This should be possible through the prerender function and a command line tool.
Command line tool would work like this: nitro render /path/to/page and when you want stdout: nitro render --stdout /path/to/page
I have already studied the generateRoute code and will post a PR that will implement the needed options and the cli tool.
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 reading the existing generateRoute code and the prerender function, then trace how Nitro's command-line tools are structured. Done means a route can be rendered through the proposed CLI command, with --stdout emitting the generated page directly for use in an Azure Function.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- azure, typescript
- Domain
- backend, cli, cloud
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100