3
I created a new project with Express and Nodejs, where I set a "/status" route. Each time this route is accessed, you must execute a routine in the script /routes/status.js
. Example: If I run a F5 in the browser with the address http://192.168.137.2:3000/status
, would have to execute the /routes/status.js
, but this does not occur.
I imagine that’s the Express’s natural behavior. However, how do I get it executed in the way I described or otherwise?
I don’t use "consign", but from what I understand in the documentation it’s something like the "nodemon" that I’m already using for the same function. But that is not what the problem in question is about. I am talking about a route that the user is opening in the browser, that is, a common address. When loading the page, the script for that route will be executed. But I don’t see it happening when I load the page.
– wBB