https://github.com/vrun545/restfull-api-using-mongodb-and-mvc-pattern
A complete guide to RESTful API using ExpressJS and MongoDB followed by MVC pattern.
https://github.com/vrun545/restfull-api-using-mongodb-and-mvc-pattern
Last synced: 2 months ago
JSON representation
A complete guide to RESTful API using ExpressJS and MongoDB followed by MVC pattern.
- Host: GitHub
- URL: https://github.com/vrun545/restfull-api-using-mongodb-and-mvc-pattern
- Owner: vrun545
- Created: 2023-11-17T14:27:25.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2023-11-17T14:51:21.000Z (over 1 year ago)
- Last Synced: 2025-01-26T06:28:08.164Z (4 months ago)
- Language: JavaScript
- Size: 18.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## Overview
Welcome to the "RESTful APIs with ExpressJS and MongoDB - A Complete Guide" project! This repository serves as a comprehensive resource for developers looking to build RESTful APIs using ExpressJS and MongoDB, following the MVC (Model-View-Controller) pattern.
## Introduction
This project aims to provide a hands-on guide to creating robust RESTful APIs using the popular Node.js framework, ExpressJS, and the NoSQL database MongoDB. The use of the MVC pattern ensures a modular and maintainable codebase, making it easy for developers to understand and extend the functionality.
## Features
- **ExpressJS:** Utilize the power of ExpressJS to create a scalable and efficient server for your RESTful APIs.
- **MongoDB:** Leverage MongoDB for data storage, taking advantage of its flexibility and scalability for handling large datasets.
- **MVC Pattern:** Implement a clean and organized code structure following the Model-View-Controller pattern for better code maintainability and separation of concerns.
- **CRUD Operations:** Learn how to perform Create, Read, Update, and Delete operations on your MongoDB database through the API.
- **Middleware:** Explore the use of middleware in ExpressJS for handling task logs of Request and Response made to the server.## Prerequisites
Before you begin, ensure you have the following installed:
- Node.js and npm
- MongoDB
- Code editor of your choice (e.g., Visual Studio Code)## Getting Started
1. Clone the repository:
```git
git clone https://github.com/vrun545/RESTfull-API-using-MongoDB-and-MVC-Pattern.git
```2. Install dependencies:
npm install
```3. Configure the MongoDB connection in the `connection.js` file.
4. Start the server:
```git
nodemon index.js
```Visit `http://localhost:3000` in your browser to access the API.
## Project Structure
The project follows a standard MVC pattern:
```
.
├── controllers
│ ├── user.js
├── models
│ ├── user.js
├── routes
│ ├── user.js
├── connection.js
├── middleware
│ └── index.js
├── index.js
└── README.md
```## Dependencies
- Express
- Mongoose
- Body-parser
- ...For a complete list of dependencies, refer to the `package.json` file.
## Usage
Detailed usage instructions and examples can be found in the [documentation](docs/).
## Contributing
Contributions are welcome! Please check the [contribution guidelines](CONTRIBUTING.md) before submitting a pull request.
## License
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.