Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

riasat97/Course-Review-API

Repository files navigation

Course Review API

Objective: Develop a Node.js Express application with TypeScript as the programming language, Authentication-Authorization and integrating MongoDB with Mongoose for course review management. Here data integrity is ensured through validation using Zod. This application is developed using Node.js, Express, MongoDB, and TypeScript.

Features

  • User authentication, authorization, and user-related information
  • Course Management: Create, read, dynamic or partial update, and delete courses.
  • Review System: Add reviews to courses.
  • Pagination and Filtering: Get paginated and filtered lists of courses.
  • Best Course Endpoint: Retrieve the best course based on average review rating and count.
  • Validation: Input validation using Zod.
  • Error Handling: Centralized error handling.

Prerequisites

Before you begin, ensure you have met the following requirements:

  • Node.js installed
  • MongoDB Atlas account (or your local MongoDB server)
  • MongoDB connection string
  • Your environment variables in a .env file (similar to the provided .env example)

Getting Started

  1. Clone the repository:

     git clone https://github.com/Porgramming-Hero-web-course/l2b2a4-course-review-with-auth-riasat97.git
  2. Navigate to the project directory:

     cd l2b2a4-course-review-with-auth-riasat97
  3. Install dependencies:

     npm install
  4. Create a .env file in the root directory and add your environment variables:

     NODE_ENV=development
     PORT=5000
     DATABASE_URL=mongodb+srv://your-username:your-password@cluster0.mongodb.net/your-database?retryWrites=true&w=majority
     BCRYPT_SALT_ROUNDS=12

    Replace your-username, your-password, and your-database with your MongoDB Atlas credentials.

  5. Start the application:

     npm run start:dev

    The application will be available at http://localhost:5000.

    API Documentation link: https://documenter.getpostman.com/view/158106/2s9YsDkF4U

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

AltStyle によって変換されたページ (->オリジナル) /