From b9fb42c9d426e28a6b4c626160309b43b2e6b52a Mon Sep 17 00:00:00 2001 From: Carl Worth Date: Sun, 26 Apr 2020 14:55:34 -0700 Subject: [PATCH] Add Hello World node app 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). --- server.js | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 server.js diff --git a/server.js b/server.js new file mode 100644 index 0000000..d66ca29 --- /dev/null +++ b/server.js @@ -0,0 +1,11 @@ +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!'); +}); -- 2.43.0