Silverdagger
Explore posts from serversCould not build NextJS project
Opened a new issue here: https://github.com/denoland/deno/issues/26179
7 replies
Missing Http method returns 200 status code on api route
yeah this is what I do atm -> create catch all routes and return 405 on all of them myself -> Just thought that maybe I missed something to "enable" this feature to do it for any undefined routes
20 replies
How can I populate HTML on the server with db data before sending it to the client
Ok so basically me changing into what I want will basically have no real effect since it fetches both document and data at the same time and instead of merging them at the server it does so in the client right?
38 replies
How can I populate HTML on the server with db data before sending it to the client
You are correct - I falsely assumed you were getting back a document on each route..
So essentially the server sends the entire app on the initial load and then the client takes over (working as a CSR from then on?)
38 replies
How can I populate HTML on the server with db data before sending it to the client
Alright I made a bit of progress thanks to your input. The behaviour is as you described (if i navigate directly to /profile I get the page without any additional request made which is what i want ) but the data still gets fetched via post if I navigate to the same /profile route using a link. To be more specific, if i navigate using <a> it works as expected but page fully reloads , on the other hand using <A> a post request is sent
Is there a way to specify that I need the data only as html and resolve all resources before sending it to the client?
I paste my code below if it helps (maybe I did something different than what you described)
38 replies
How can I populate HTML on the server with db data before sending it to the client
I selected SSR in the initialization options (althought it doesn't state anything about it in the vite config i believe that it is because its true by default) -> the server$ from what I saw does a post request fetching the data and I want to avoid having extra requests when the data doesn't require reactivity
38 replies