Node.js-> Command Line
Node.js prompts and commands for use with Node.js applications and Node.js development environments.
π 65 Prompts
π Prompts in this Group
Learn these prompts step by step to master this theme
8
Complete the async function:
async function fetchData() {
Β Β return awaitPromise .resolve('Hello!');
}
9
Complete the code to create your first Node.js application:
let http = require('http');
http.createServer(function (req, res) {
res.writeHead(200, {'Content-Type': 'text/html'});
res.end('Hello World!');
}).listen(8080);
22
Install all dependencies and then remove unused packages in two commands
npm install
npm prune
34
Node.js path selection
[Environment]::SetEnvironmentVariable("Path", "C:\Program Files\nodejs;" + [Environment]::GetEnvironmentVariable("Path", "User"), "User")
52
Set the maximum old space size for V8 heap memory to 4GB
node --max-old-space-size=4096 app.js
65
What npm command do you use to install the http-server package globally?
npm install http-server -g