What do you want to save?
Add Code snippet
New code examples
-
Other 2021-11-22 00:44:24
install puppeteer linux 18.04
# install curl if not installed $ sudo apt install curl # install node 10.x repository to the system $ curl -sL https://deb.nodesource.com/setup_10.x | sudo -E bash - # download & install nodejs 10.x along with npm $ sudo apt install nodejs # insta... Add solution -
Javascript 2021-11-21 22:07:08
install nodejs from ubuntu 18.04
// Enabling NodeSource Repository // replace %V% with desired major version curl -sL https://deb.nodesource.com/setup_%V%.x | sudo bash - // Install using apt-get sudo apt-get install -y nodejs // check installed node version node --version Add solution -
Javascript 2021-11-18 16:00:14
install node js lts ubuntu 18.04
// Enabling NodeSource Repository // replace %V% with desired major version curl -sL https://deb.nodesource.com/setup_%V%.x | sudo bash - // Install using apt-get sudo apt-get install -y nodejs // check installed node version node --version Add solution -
Shell/Bash 2021-11-18 02:16:22
install nodejs debian 10
# Install Node.js 16 sudo apt install curl -y curl -sL https://deb.nodesource.com/setup_16.x | sudo bash - sudo apt install nodejs -y # If NPM didn't get installed sudo apt install npm -y # For another node version use curl -sL https://deb.nodesource.co... Add solution -
Javascript 2021-11-15 18:43:10
set proxy to use nodejs in angular
// in NodeJS (3000 port) make: app.get('/api/user', (req, res) => { res.json({}); }); // in Angular (4200 port): // make call async ngOnInit(): Promise<void> { let result = await this.http.get("http://127.0.0.1:4200/api/user").to... Add solution -
Javascript 2021-11-14 18:07:28
nodejs write raw buffer to file
/* Using nodejs' fs module you can create a WriteStream to handle raw stream of bytes and buffers. */ const path = "path/to/the/file"; array = BigInt64Array(0); buffer = Buffer.from(array.buffer) fs.createWriteStream(path).write(buffer); Add solution -
Javascript 2021-11-14 09:28:34
edit json via nodejs
//Using edit-json-file for NodeJS, based off the NPM documentation for edit-file-json const editJsonFile = require("edit-json-file"); let file = editJsonFile(`${__dirname}/filename.json`); file.set("name", "value"); file.save... Add solution -
Javascript 2021-11-14 08:26:11
node appendFile sync
//Name of the file : appendfile-sync.js //file append operation in nodejs var fs = require('fs'); var content = "We are Appending this file synchronously using node.js"; fs.appendFileSync('assets/new.txt', content); console.log(&qu... Add solution