Skip to content

ny-collins/express-routing-practice

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Express Routing Practice

This is a basic project to practice routing using Express.js, a popular web framework for Node.js. The goal is to gain hands-on experience working with different types of HTTP routes, parameters, and middleware.

🚀 Getting Started

These instructions will help you get a copy of the project up and running on your local machine for development and testing purposes.

Prerequisites

Make sure you have the following installed:

  • Node.js
  • npm
  • git - For handling your repositories.
  • Visual Studio Code - This is one of the most popular IDE's, but you can use any other, or any code editor.

Installation

git clone https://github.com/your-github-username/your-repo-name.git
cd your-repo-name
npm install

Running the Server

node index.js

The server will start on localhost:3000 (unless specified otherwise in the code. For my code, I specified Port 3001).


📂 Project Structure

express-routing-practice/
│
├── index.js          # Main entry point
├── routes/
│   ├── user.js       # Routes related to users
│   └── product.js    # Routes related to products
├── package.json
└── README.md

🧪 Features to Practice

  • Basic routing with app.get, app.post, etc.
  • Route parameters (/users/:id)
  • Middleware usage
  • Modular routing with express.Router()
  • Response handling

🤝 Contributing

Feel free to fork this repository, create a new branch, and submit a pull request.


📃 License

This project is open source and available under the MIT License.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published