This project is a Node.js backend server for managing a menu system that includes categories, subcategories, and items. The server is built using Express.js and MongoDB.
-
Clone the Repository:
git clone https://github.com/shubham71099/guestara.git cd guestara
-
Install Dependencies:
npm install
-
Set Up Environment Variables::
MONGO_URI=mongodb://localhost:27017/guestara PORT=5000
-
Run the Application::
npm start
I chose MongoDB for this project due to its flexibility in handling hierarchical data structures such as categories, subcategories, and items. MongoDB's document-based approach makes it easier to model these relationships efficiently.
- CRUD Operations with RESTful APIs: Implementing Create, Read, Update, and Delete operations effectively using Express.js.
- Middleware in Express.js: Learned how to use middleware for handling JSON data, routing, and other request processing tasks.
The most challenging part was structuring and managing the relationships between categories, subcategories, and items in MongoDB.
I would have implemented authentication to secure the API endpoints and implementing more comprehensive error handling.