Tutorial by Examples

const http = require('http'); console.log('Starting server...'); var config = { port: 80, contentType: 'application/json; charset=utf-8' }; // JSON-API server on port 80 var server = http.createServer(); server.listen(config.port); server.on('error', (err) => { if (err.c...
const process = require('process'); const rl = require('readline').createInterface(process.stdin, process.stdout); rl.pause(); console.log('Something long is happening here...'); var cliConfig = { promptPrefix: ' > ' } /* Commands recognition BEGIN */ var commands = {...

Page 1 of 1