/day2-nodemodules

Setup Node Project and Express Crud

Primary LanguageJavaScript

Setup an express Project

  1. npm init - initialse a package.json file

  2. create index.js file

  3. npm i express - install express in our project

  4. Import express in index.js file

  5. Create an app using the express package

  6. writing a basic route using app

  7. Make the app to listen a specific port

  8. Install nodemon to automate the restart of server when file changes

  9. npm i -g nodemon

  10. run command nodemon on cmd terminal not powershell

  11. Add type as module in pacakage.json to use ES6 import module