Skip to content

Latest commit

 

History

History
49 lines (41 loc) · 2.35 KB

README.md

File metadata and controls

49 lines (41 loc) · 2.35 KB

Express.js Lecture

🚀 Get Started

Step 1: Pre-requisites

Download and install the following software:

  • Node.js on Ubuntu/Windows
    • Preferred to install Node Version Manager (NVM) for Ubuntu/Windows.
    • Open a terminal and then type nvm install 20.17.0 to install Node.js v20.17.0
    • Then type nvm use 20.17.0 to use the Node.js v20.17.0 to install node packages
  • Code editor
  • Git on Ubuntu/ Windows
  • Github Desktop on Ubuntu/Windows

Step 2: Clone the repository

  • If you have GitHub Desktop installed
    • Clone the repository by clicking the green Code button and then Open with GitHub Desktop.
    • Select the location where you want to clone the repository and click the Clone button.
  • Open a terminal and type the command below to clone the repository.
    git clone https://github.com/shoebjoarder/expressjs-lecture

Step 3: Install dependencies and run codes

  • Open the project using a code editor.
  • In VSCode, click the Terminal menu from the top menu and click New Terminal.
  • Switch between branches to view the different topics. Type git checkout <branch_name> in the terminal to switch between the branches. Remember to replace <branch_name> with the actual branch name, e.g.,
    git checkout 1-basic-routing
  • Open the terminal and type the following command to install the node packages.
    npm ci
    • If you get an error, try typing the npm install or npm install --force command.
  • Install nodemon globally
    npm i -g nodemon
    
  • Run the following command in the terminal to start the server.
    npm run app