Basic express coding

Hi guys,
I’ve got 3 questions about simple use of node/express.

First question is: I’m hosting the server on my computer but each time I make modifications to the app, I need to turn off the server and launch it again to actually see what I’ve done. So is there a way to change that?

Then is there a way to communicate with the server the same way we do with a normal javascript file ? (in the browser or the prompt to check variables etc).

Which leads to my last question, how can I check if the route is empty? (first project API microservice) I’ve tried a bunch of things like
if(req.params.date_string === '') or null or undefined
But nothing seems to work…
Thanks for your help and your time !

You can use nodemon

I don’t think i have understood your question but if you meant accessing your server code from client side. No you can’t do that.

I think you can do that using route parameters.

1 Like

Thank you ! I finally manage to make it work.
But yeah debugging is pretty hard while server is not accessible.

1 Like