sudo snap install node --classic --channel 12/stable
node -v
npm -v
npm init
npm install [email protected]
npm uninstall validator
npm install [email protected]
node app.js
sudo npm install [email protected] -g
nodemon app.js
Use yargs
npm i [email protected]
node app.js --help
node app.js --version
node app.js add --title="Shopping lit"
npm i [email protected]
npm i [email protected]
npm i [email protected]
Add debugger in the code
Execute inspect
Open Chrome on chrome://inspect/
Press inspect
Press play buttom
Console
Example 1:
Example 2:
Example 3:
Run hds together node with nodemon
nodemon src/app.js -e js,hbs
Install Horoku
curl https://cli-assets.heroku.com/install.sh | sh
heroku -v
heroku login
heroku keys:add #add public to to heroku
cd web-server-node-js/
heroku create mead-weather-application
git push heroku main
Execute app node localy
chmod +x src/app.js
npm run start
npm run dev
npm install [email protected] --save-dev
npm init -y
npm i [email protected]
npm i [email protected]
npm i [email protected]