This is similar to what is documented here:
https://medium.com/@adnanrahic/hello-world-app-with-node-js-and-express-
c1eb7cfa8a30
but with some more modern content as recommended by Richard.
This can be run with:
node server
in the current directory, (and then pointing a user agent at localhost:3000).
--- /dev/null
+const express = require("express")
+
+const app = express();
+
+app.get('/', function (req, res) {
+ res.send('Hello World!');
+});
+
+app.listen(3000, function () {
+ console.log('Example app listening on port 3000!');
+});