Welcome to my Node.js REST API project! This project serves as a demonstration of my backend development skills using Node.js, Express, TypeScript, and MongoDB.
- Node.js: A JavaScript runtime environment that allows you to run JavaScript on the server.
- Express: A fast, minimalist web framework for Node.js that simplifies building robust APIs.
- TypeScript: A statically typed superset of JavaScript that enhances code quality and maintainability.
- MongoDB: A NoSQL database used for data storage and retrieval.
- Mongoose: An ODM (Object Data Modeling) library for MongoDB and Node.js, making it easier to work with MongoDB.
I've configured the project with TypeScript and Nodemon for automatic server restarts during development. This ensures a smooth development experience.
The API connects to a MongoDB database using Mongoose. I've included database creation scripts and configurations to set up the database.
I've implemented controllers to handle various API routes, ensuring clean and organized code for request handling.
Middleware functions are crucial for request processing. I've included middlewares for tasks like authentication, error handling, and input validation.
This API supports cookie-based authentication to secure routes. Users can authenticate and access protected resources.
To demonstrate the functionality of the API, I've included a Postman collection that you can import and use for testing various endpoints.
The API supports CRUD operations for managing resources, such as creating, reading, and updating data.
To get started with this project, follow these steps:
- Clone this repository to your local machine.
- Install the required dependencies using
npm install. - Set up a MongoDB instance and configure the connection in
config/database.ts. - Run the development server using
npm run dev. - Explore the API using the provided Postman collection for testing.
I welcome contributions and feedback from the developer community. If you find issues or have suggestions for improvements, please open an issue or create a pull request.
Feel free to reach out to me if you have any questions or would like to discuss this project further:
- Email: ryanlo5102000@gmail.com
- LinkedIn: https://www.linkedin.com/in/ryan-lo/