-
Notifications
You must be signed in to change notification settings - Fork 514
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Possibility to render a single route directly to stdout #2466
Comments
This would also trickle down to frameworks like |
This could be extended so that an |
This is a nice idea but perhaps something to rethink for the future. (some context: #2467 (comment)) |
I would like to work on this feature. You said in the PR: "Nitro has already a CLI preset intended for same thing (standalone output that can render to stdout without depending in nitro builder core) -- PR welcome to improve it". Do you mean the And, regarding the programmatic API, is the |
I meant (I guess not working on latest branch needs a simple fix to remove CJS check) For node variant,
Yes we could export it from In summary there are two tracks we can move this forward:
First, requires updates to the current Second, requires introduction of smart rebuild and some cleanups in prerender implementation to make sure we can maintain it in the future. |
Alright, now I got the gist of the cli preset. Makes sense. I made a PR for the fix for the preset, now. I will next investigate if it suits my use case. |
That is the PR based on v2 |
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
The text was updated successfully, but these errors were encountered: