I am creating a web application using express.js. I have been following a course by Angela Wu, and one of the chapters involves a templating tool called 'Express' which is built on node.js. Following is a very simple example for a file named 'node.js':
import express from "express"; const app = express(); const port = 3000; app.get("/", (req, res) => { res.send("<h1>Hello World!</h1>"); }); app.listen(port, () => { console.log(`Listening on port $(port)`) }); To run this, I open a terminal window inside of Visual Studio Code, and execute the command
node index.js This will then use the 'node' library to create an http listener on 'localhost/3000'.
Now here is the question: How can I deploy this simple application to a remote host?