This repository houses the backend for a Course Selling Website, employing Express.js as the backend framework, MongoDB as the database, Zod library for input validation, and Auth for user validation. JSON Web Tokens (JWT) are utilized for secure and stateless authentication.
To initiate the project, follow these steps:
-
Clone the repository to your local machine:
git clone https://github.com/your-username/course-selling-app.git
-
Install the necessary dependencies:
cd course-selling-app npm install
-
Configure the environment:
-
Create a
.env
file in the project root and set the following variables:PORT=3000 MONGODB_URI=mongodb://localhost:27017/course_selling_db JWT_SECRET=your_jwt_secret_key
-
-
Launch the application:
node index.js
The server will run on the specified port (default is 3000).
- Express.js: Fast, unopinionated, minimalist web framework for Node.js.
- MongoDB: NoSQL database for storing and retrieving data.
- Zod: TypeScript-first schema declaration and validation library.
- JWT: JSON Web Tokens for secure authentication.