From: AJ ONeal Date: Wed, 6 May 2020 03:34:41 +0000 (+0000) Subject: don't use tables X-Git-Url: https://git.josue.xyz/?a=commitdiff_plain;h=99bbaa3c5907950265483e926fed5d55401fdf44;p=webi-installers%2F.git don't use tables --- diff --git a/node/install.bash b/node/install.bash index e4a2ef7..0d1f24d 100644 --- a/node/install.bash +++ b/node/install.bash @@ -6,25 +6,52 @@ # description: | # Node.js® is a JavaScript runtime built on Chrome's V8 JavaScript engine # examples: | +# +# ### Hello World +# # ```bash # node -e 'console.log("Hello, World!")' # > Hello, World! # ``` +# #
+# +# ### A Simple Web Server +# +# `server.js`: +# +# ```bash +# var http = require('http'); +# var app = function (req, res) { +# res.end('Hello, World!'); +# }; +# http.createServer(app).listen(8080, function () { +# console.info('Listening on', this.address()); +# }); +# ``` +# #
# -# -# -# -# -# -#
Run a webserver

+#   ```bash
+#   node server.js
+#   ```
+#
+#   ### An Express App
+#
+#   ```bash
 #   mkdir my-server
 #   pushd my-server
 #   npm init
-#   npm install --save express
-#
-# app.js: +# npm install --save express +# ``` +# #
-#
'use strict'
+#
+#   `app.js`:
+#
+#   ```js
+#   'use strict';
+#
 #   var express = require('express');
 #   var app = express();
 #
@@ -33,20 +60,29 @@
 #   });
 #
 #   module.exports = app;
+# ``` +# #
-# server.js: -#
-#
'use strict'
+#
+#   `server.js`:
+#
+#   ```js
+#   'use strict';
+#
 #   var http = require('http');
 #   var app = require('./app.js');
+#
 #   http.createServer(app).listen(8080, function () {
-#     console.log('Listening on', this.address());
-#   });
+# console.info('Listening on', this.address()); +# }); +# ``` +# #
-#
npm start
-#
+# +# ```bash +# npm start +# ``` +# set -e set -u