This project is a Node.js and TypeScript-based API for managing students productivity and to also enable them collaborate using special features. It includes functionality for creating accountability groups, progress bars, leaderboard and points for tracking progress.
- Get Specific weathers from different cities across the world
- Node.js
- Express
- TypeScript
- MongoDB
- Mongoose
- External API
- Node.js and npm installed
- MongoDB Atlas account
-
Clone the repository:
git clone https://github.com/boluwatife010/Todo-List-Project.git cd Todo-List-Project -
Install dependencies:
npm install
-
Create a
.envfile in the root of the project and add your environment variables:MONGO_URI=mongodb+srv://<username>:<password>@cluster0.mongodb.net/mydatabase?retryWrites=true&w=majority PORT=8090 JWT_SECRET=your jwt secret CLIENT_ID=Your google client id CLIENT_SECRET=Your your client secret SESSION_SECRET=Your session secret
-
Start the server:
npm start ts-node app
Challenge: Ensuring type safety while interacting with Mongoose models. Solution: Defined TypeScript interfaces for request bodies and Mongoose models to maintain type safety across the application.
Challenge: TypeScript errors when dealing with optional fields. Solution: Used type assertions and optional chaining to handle optional fields properly.
Challenge: Difficulty in connecting to the cloud MongoDB instance. Solution: Whitelisted IP addresses and used the correct connection string format provided by MongoDB Atlas.
For detailed API documentation, please refer to the API Documentation on Postman.
This project is licensed under the MIT License.