In this episode, you’ll build the foundation of your NodeJS project by creating an Express server. You’ll learn how to set up the server environment, configure basic routes, and understand how Express handles HTTP requests. This video covers everything you need to know to get your server up and running efficiently.
setup
- npm init - intialize the project - it will ask some quetions of package name entry point etc
now it will create new file in folder which is configuration file package.json
writing code
- create src folder → app.js this is the starting point of your application u can write any piece of js code inside this file console.log(”starting a new project”) and run using command node app.js
- now we need to create server so that we listen on the the request of client basically accepting incoming request on the server and we will use express.js for creating server
- so we need to install express.js
npm i express
