I’m practicing making an Express application. Here is the code:
const express = require("express");
const app = express();
app.get("/", (req, res) => {
console.log("user hit the resource");
res.send("Home Page NM");
});
app.listen(5000, () => {
console.log(`PORT IS 5000`);
});
When I open up my local host, everything will be fine. However, when I change the res.send() to send a different type of text, it will not update even though I refresh the page and “user hit the resource” is displayed on the console again. What can I do?
Thank you, however when I run npm start dev, I still need to manually close the local host tab AND kill the terminal to make it refresh and show new information.