Skip to content

PLP-MERN-Stack-Development/week-2-express-js-assignment-Elyse2001

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Open in Visual Studio Code

Express.js RESTful API Assignment

This assignment focuses on building a RESTful API using Express.js, implementing proper routing, middleware, and error handling.

Assignment Overview

You will:

  1. Set up an Express.js server
  2. Create RESTful API routes for a product resource
  3. Implement custom middleware for logging, authentication, and validation
  4. Add comprehensive error handling
  5. Develop advanced features like filtering, pagination, and search

Getting Started

  1. Accept the GitHub Classroom assignment invitation
  2. Clone your personal repository that was created by GitHub Classroom
  3. Install dependencies:
    npm install
    
  4. Run the server:
    npm start
    

Files Included

  • Week2-Assignment.md: Detailed assignment instructions
  • server.js: Starter Express.js server file
  • .env.example: Example environment variables file

Requirements

  • Node.js (v18 or higher)
  • npm or yarn
  • Postman, Insomnia, or curl for API testing

API Endpoints

The API will have the following endpoints:

  • GET /api/products: Get all products
  • GET /api/products/:id: Get a specific product
  • POST /api/products: Create a new product
  • PUT /api/products/:id: Update a product
  • DELETE /api/products/:id: Delete a product

Submission

Your work will be automatically submitted when you push to your GitHub Classroom repository. Make sure to:

  1. Complete all the required API endpoints
  2. Implement the middleware and error handling
  3. Document your API in the README.md
  4. Include examples of requests and responses

Resources

About

plp-mern-stack-development-classroom-week-2-express-js-assignment-MERN-Stack-Week2 created by GitHub Classroom

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%