[v1] + SSR... How to restart only Server when saving files files in src-ssr
-
is it possible to restart only the server side without restarting the whole app in ssr mode?
i just wanna restart the server whenever i save files in src-ssr and i dont what to open a new browser tab after saving
this take tool much timei could have used nodemon but dont how to configure it with quasar
-
What is it you are altering? Theoretically, for Quasar, you should develop in dev mode and then rebuild for SSR later.
Scott
-
This post is deleted! -
This post is deleted! -
@s-molinari I have not altered anything…I just run: quasar dev -m ssr
But if i modify any file from .src-ssr/ i have to restart by doin ctrl+c and run: quasar dev -m ssr in terminal again to make effect of the change -
What is it you are altering in .src-ssr? I don’t think those files are considered part of the dev environment, since it is the node server (express) being created in that folder. It’s all new to me too, to be honest.
Scott
-
@s-molinari
Well my app requires that i create some APIs from backend to serve data to the front end e.g getting users from mongodb and registering users to the database.
all these happen from backend and I would connect to any of this APIs through axios from client side(.vue files)
but whenever i work on those APIs, I have to manually restart the dev Server all over again to effect the changes i made to the APIs -
Ah. Ok. I’d create a separate backend server project (also with it’s own nodemon) and run it all over a different terminal.
Scott
-
@s-molinari said in [v1] + SSR... How to restart only Server when saving files files in src-ssr:
Ah. Ok. I’d create a separate backend server project (also with it’s own nodemon) and run it all over a different terminal.
Scott
This is why I’m using Quasar SSR in the first place…
to have both server and client in one app…this issue is simply solved in NuxtJs with nodemon -
Can you refer me to the docs of Nuxt, where an API server can also be implemented inside of Nuxt? I’m not aware of this possibility and would like to learn how they do it.
If someone else with more experience can also help folami, I would be greatly thankful.
Scott
-
The
/src-ssr/extension.js
file was being monitored, but there was a deep bug hindering running the “updated” version whenever you change the file.Fixed it and furthermore (for completeness) Quasar will now watch the entire src-ssr folder for changes – because your src-ssr/extension.js might import some other files in that folder.
Fix will be available in
@quasar/app
v1.0.0-beta.16. Logged a bug for this: https://github.com/quasarframework/quasar/issues/3845 -
thanks so much for your response…