generalize, a lot
[webi-installers/.git] / node / package.yash
1 #
2 # title: Node.js
3 # homepage: https://nodejs.org
4 # tagline: JavaScript V8 runtime
5 # description: |
6 #   Node.jsĀ® is a JavaScript runtime built on Chrome's V8 JavaScript engine
7 # examples: |
8 #
9 #   ### Hello World
10 #
11 #   ```bash
12 #   node -e 'console.log("Hello, World!")'
13 #   > Hello, World!
14 #   ```
15 #
16 #   ### A Simple Web Server
17 #
18 #   `server.js`:
19 #
20 #   ```bash
21 #   var http = require('http');
22 #   var app = function (req, res) {
23 #     res.end('Hello, World!');
24 #   };
25 #   http.createServer(app).listen(8080, function () {
26 #     console.info('Listening on', this.address());
27 #   });
28 #   ```
29 #
30 #   ```bash
31 #   node server.js
32 #   ```
33 #
34 #   ### An Express App
35 #
36 #   ```bash
37 #   mkdir my-server
38 #   pushd my-server
39 #   npm init
40 #   npm install --save express
41 #   ```
42 #
43 #   `app.js`:
44 #
45 #   ```js
46 #   'use strict';
47 #
48 #   var express = require('express');
49 #   var app = express();
50 #
51 #   app.use('/', function (req, res, next) {
52 #     res.end("Hello, World!");
53 #   });
54 #
55 #   module.exports = app;</code></pre>
56 #   ```
57 #
58 #   `server.js`:
59 #
60 #   ```js
61 #   'use strict';
62 #
63 #   var http = require('http');
64 #   var app = require('./app.js');
65 #
66 #   http.createServer(app).listen(8080, function () {
67 #     console.info('Listening on', this.address());
68 #   });
69 #   ```
70 #
71 #   ```bash
72 #   npm start
73 #   ```
74 #
75
76 This is a comment... because... poor choices I made.
77
78 Don't worry, this will be yaml or markdown in the... sometime... future