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
Server-Side Data #61
Comments
Hi @knpwrs Actually, Nuxt.js already render a page that can work without the JS on the client-side (because it's server-renderer). For connecting to a server-side database, I would not recommend it because when navigating in the client-side, your page will have to render the data as well and since you want to protect it for only the server-side, it won't work. Nuxt.js is made to create web-application based on API so the API call (http request from the server-side or ajax request on the client-side) will work for both environments. |
Unfortunately the API call won't work for a client without JavaScript which kinda makes server-side rendering moot except for the point of getting a fast initial render. |
Is it possible load data to nuxt.js without creating additional http request from server-side, and send rendered html page to client? |
@Mirodil please take a look at this answer I wrote: #123 (comment) |
Thanks, from client side it works and looks perfect, but server side part bit odd. |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
As it stands today, is there a good way to connect to a server-side database and render pages that work without JavaScript on the client, but can progressively enhance to use JavaScript on the client if available? Essentially that would mean not exposing a rest API, but instead having some sort of data provider mechanism that doesn't leak secrets to the client.
The text was updated successfully, but these errors were encountered: