Skip to content

Lo-Mein/node-rest-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Node.js REST API

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.

Technologies Used

  • 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.

Features

Environment, TypeScript, Nodemon Setup

I've configured the project with TypeScript and Nodemon for automatic server restarts during development. This ensures a smooth development experience.

MongoDB & Mongoose Connect, Database Creation

The API connects to a MongoDB database using Mongoose. I've included database creation scripts and configurations to set up the database.

Controllers Creation

I've implemented controllers to handle various API routes, ensuring clean and organized code for request handling.

Middlewares Creation

Middleware functions are crucial for request processing. I've included middlewares for tasks like authentication, error handling, and input validation.

Cookie-Based Authentication

This API supports cookie-based authentication to secure routes. Users can authenticate and access protected resources.

Postman Testing

To demonstrate the functionality of the API, I've included a Postman collection that you can import and use for testing various endpoints.

CRUD Operations (Create, Read, Update, Delete)

The API supports CRUD operations for managing resources, such as creating, reading, and updating data.

Getting Started

To get started with this project, follow these steps:

  1. Clone this repository to your local machine.
  2. Install the required dependencies using npm install.
  3. Set up a MongoDB instance and configure the connection in config/database.ts.
  4. Run the development server using npm run dev.
  5. Explore the API using the provided Postman collection for testing.

Contributions

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.

Contact

Feel free to reach out to me if you have any questions or would like to discuss this project further:

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors