3 homepage: https://nodejs.org
5 Node.jsĀ® is a JavaScript runtime built on Chrome's V8 JavaScript engine.
7 Node is great for simple, snappy HTTP(S) servers, and for stitching APIs together with minimal fuss or muss.
9 Installing node via webi will:
11 - pick a compatible version from the [Node Releases API](https://nodejs.org/dist/index.tab)
12 - download and unpack to `$HOME/.local/opt/node/`
13 - update your `PATH` in `$HOME/.config/envman/PATH.env`
14 - run `npm config set scripts-prepend-node-path=true`
15 - (prevents conflicts with other installed node versions)
16 - absolutely leave system file permisions alone
17 - (no dreaded `sudo npm` permission errors)
23 node -e 'console.log("Hello, World!")'
32 var http = require('http');
33 var app = function (req, res) {
34 res.end('Hello, World!');
36 http.createServer(app).listen(8080, function () {
37 console.info('Listening on', this.address());
51 npm install --save express
59 var express = require('express');
62 app.use('/', function (req, res, next) {
63 res.end("Hello, World!");
66 module.exports = app;</code></pre>
74 var http = require('http');
75 var app = require('./app.js');
77 http.createServer(app).listen(8080, function () {
78 console.info('Listening on', this.address());