This API aims to facilitate the management of items for a supermarket shopping list. With this API, you can add, update, view, and delete items from your shopping list.
To run the API, you need the following dependencies and technologies:
- Docker - Containerization platform for developing, shipping, and running applications.
- Node.js - JavaScript runtime environment.
- Express - Web framework for Node.js.
- MongoDB - Document-oriented NoSQL database.
- Mongoose - Object Data Modeling (ODM) for MongoDB and Node.js.
- Nodemon - Utility that monitors changes in files and automatically restarts the server.
To configure the database, follow the steps below:
-
Create a MongoDB instance using Docker:
docker run --name mongo-supermarket -p 27017:27017 -d mongo
To run the project, follow these steps:
-
Git clone the repository:
git clone https://github.com/xcodedi/supermarket-list-api.git
-
Navigate to the project folder and install dependencies:
cd supermarket-list-api (npm install)
-
Run the project in development mode:
npm run start:dev
-
Or run the project in production mode:
npm run start
To test the API, use Insomnia to import the file below: Insomnia.json