This repository contains the backend for the Course Selling App, a robust and scalable platform designed to facilitate the selling and management of online courses.
- User Authentication: Secure login and registration for users and admins.
- Course Management: Perform CRUD operations to manage courses.
- Role-Based Access Control: Ensures proper access levels for users and admins.
- Payment Integration: Supports payment gateways for seamless transactions.
- API Endpoints: Well-structured REST APIs for smooth communication with the frontend.
- Node.js with Express.js: For building server-side logic.
- MongoDB: For efficient and scalable database management.
- JWT Authentication: For secure user sessions.
- Node.js and npm installed on your machine.
- MongoDB running locally or accessible via a connection string.
- Git
-
Clone the Repository
git clone https://github.com/profTanish/course-selling-app-backend
-
Navigate to the Project Directory
cd course-selling-app-backend -
Install Dependencies
npm install
-
Set Up Environment Variables
- Create a .env file in the root directory of the project.
- Use the .env.example file as a reference to define your environment variables.
- Example:
PORT=5000 MONGO_URI=your_mongodb_connection_string JWT_SECRET=your_jwt_secret_key
-
Start MongoDB -If you are running MongoDB locally, make sure the service is started. -Alternatively, provide your cloud MongoDB connection string in the .env file.
-
Run the Application
node index.js
-
Access the Backend
- Open your browser or API testing tool (e.g., Postman) and navigate to
http://localhost:5000
- Open your browser or API testing tool (e.g., Postman) and navigate to
-
Test the APIs
- Use tools like Postman or cURL to test the API endpoints.
- This project is licensed under the MIT License.
- For any questions or support, feel free to reach out:
- GitHub: profTanish