To uninstall the Angular CLI, you can use the following command in the terminal: This will remove the Angular CLI from your system. To upgrade the Angular CLI to the latest version, you can use the following command: npm install -g @angular/cli@latest This will install the latest version of the Angular CLI globally on your system. If you want to upgrade to a specific version of Angular CLI, you can replace latest with the version…
Set for a global run. npm install nodemon –save-dev In the Package.json file, we need to put the start and file name. “scripts”: { “test”: “echo \”Error: no test specified\” && exit 1″, “start”: “nodemon app.js” } npm start
Alternatively you can stay with previous version by running this commands npm uninstall express-validator npm install express-validator@5.3.0
Error Look Like: It’s not recommended to use sudo with npm install, follow the steps from npmjs official docs instead 🙂 Make a directory for global installations: mkdir ~/.npm-global Configure npm to use the new directory path: npm config set prefix ‘~/.npm-global’ Open or create a ~/.profile file and add this line: export PATH=~/.npm-global/bin:$PATH Back on the command line, update your system variables: source ~/.profile Test: Download a package globally without using sudo. npm install…
https://youtu.be/tGdGB5Pul2M var nodemailer = require(‘nodemailer’); var send = require(‘gmail-send’); var mailserverifo = nodemailer.createTransport({ service: ‘gmail’, host : “smtp.gmail.com”, port : “465”, ssl : true, auth: { user: ’email@gmail.com’, pass: ‘password@’ } }); var Mailinfo = { from: ’email@gmail.com’, to: ’email@info.com’, subject: ‘Testing email from node js server’, text: ‘That was easy!’ }; mailserverifo.sendMail(Mailinfo, function(error, info){ if (error) { console.log(error); } else { console.log(‘Email Send Success: ‘ + info.response); } }); Enable less secure app form…
Loading basic HTML in Node.js var http = require(‘http’); var fs = require(‘fs’); http.createServer(function(request, response) { response.writeHeader(200, {“Content-Type”: “text/html”}); var readSream = fs.createReadStream(‘index.html’,’utf8′) readSream.pipe(response); }).listen(3000); console.log(“server is running on port number “);