From 99bbaa3c5907950265483e926fed5d55401fdf44 Mon Sep 17 00:00:00 2001 From: AJ ONeal Date: Wed, 6 May 2020 03:34:41 +0000 Subject: [PATCH] don't use tables --- node/install.bash | 72 +++++++++++++++++++++++++++++++++++------------ 1 file changed, 54 insertions(+), 18 deletions(-) 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! # ``` -#
+# #
# -# -# -# -# -# -#
Run a webserver

+#   ### 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());
+#   });
+#   ```
+#
+#   
+# +# ```bash +# node server.js +# ``` +# +# ### An Express App +# +# ```bash # mkdir my-server # pushd my-server # npm init -# npm install --save express
+# npm install --save express +# ``` +# #
-# app.js: -#
-#
'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