From: Carl Worth Date: Sun, 26 Apr 2020 21:55:34 +0000 (-0700) Subject: Add Hello World node app X-Git-Url: https://git.cworth.org/git?a=commitdiff_plain;h=b9fb42c9d426e28a6b4c626160309b43b2e6b52a;p=lmno-server 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). --- 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!'); +});