Learning-Node.js-and-Express.js---Coding-Addict

My Learning Process and Relavent Notes

Node.js and Express.js - Full Course --- 3:28:48/8:18:47

Built-in module:

  • OS
  • PATH
  • FS //file
  • HTTP

Install npm package

  • npm i
  • npm i -g
  • npm install #automatically install modules from package.json

To generate package.json

  • npm init
  • npm init -y (everything default)

package.json

dependencies: installed local packages
devDependencies:installed packages if only

the env is development
script:
"start" : "node app.js" //npm start:execute node command
"dev" : "nodemon app.js"//npm run dev:execute nodemon command

  • nodemon - watches the change and restarts/reruns the file.

#Event-Driven Programming: Listens for specific events, registered functions will be executed in response of these events