This is the backend API for a simple Course Selling Platform built using Express.js, Sequelize, and MySQL. The application allows admins to manage courses, and users to view courses.
- User Registration: Users can create an account by providing basic details.
- Admin Access: Admins can create, update, and delete courses.
- Course Management: Users can view available courses.
- Sequelize ORM: Uses Sequelize for interacting with the MySQL database.
- Node.js: Backend runtime environment.
- Express.js: Web framework for building the API.
- Sequelize: ORM for MySQL database management.
- MySQL: Database for storing user and course data.
- Dotenv: For managing environment variables.
- Node.js (v14 or higher)
- MySQL (v5.7 or higher)
Follow the steps below to set up the project locally:
- Clone the repository:
git clone https://github.com/your-username/course-selling-platform-backend.git
- Navigate to the project folder:
git clone https://github.com/your-username/course-selling-platform-backend.git
- Clone the repository:
cd course-selling-platform-backend - Install dependencies:
npm install
- Set up environment variables:
DB_USERNAME=your-database-username DB_PASSWORD=your-database-password JWT_SECRET=localhost PORT=3000
- Create the database:
CREATE DATABASE coursedb;
- Run the server:
npm start