The Car Warehouse Management System is a backend application developed in Node.js and Express.js. It provides a simple inventory management system for managing cars stored in a warehouse. The application allows you to perform operations such as adding new cars, retrieving existing cars, and deleting cars from the inventory.
- Server-Side Language: Node.js
- Database: MySQL or any other relational database
- API: Develop a backend API for managing the car warehouse
- Deployment: Deploy the application using Heroku
- Documentation: Include setup, usage, and deployment instructions
To run the Car Warehouse Management System locally, follow these steps:
-
Clone the repository:
git clone https://github.com/MostafaMGomaa/Car-Warehouse.git
-
Navigate to the project directory:
cd car-warehouse-management
-
Install the dependencies:
npm install
-
Set up the database:
- Create a MySQL database and update the database configuration in the .env file.
- Here's an example of the .env file:
DB_HOST=localhost DB_PORT=3306 DB_USER=myusername DB_PASSWORD=mypassword DB=mydatabase-name
-
Start the application:
npm start
The Car Warehouse Management System provides the following API endpoints:
- GET /cars: Retrieve all cars from the warehouse inventory.
- GET /cars/:id: Retrieve a specific car by ID.
- POST /cars: Add a new car to the warehouse inventory.
- PUT /cars/:id: Update a specific car by ID.
- DELETE /cars/:id: Delete a specific car by ID.
Refer to the API documentation for detailed information on how to use each endpoint.
The Car Warehouse Management System can be deployed using Heroku. Follow these steps to deploy the application:
-
Create a Heroku account if you don't have one.
-
Install the Heroku CLI by following the instructions in the Heroku Dev Center .
-
Log in to Heroku from the command line:
heroku login
-
Create a new Heroku app:
heroku create car-warehouse
-
Set up the MySQL database on Heroku using addons or an external service.
- Update the database configuration in the .env file with the Heroku database credentials.
-
Deploy the application to Heroku:
git push heroku main
-
Start the app on Heroku:
heroku ps:scale web=1
-
Open the deployed app in the browser:
heroku open
Contributions are welcome! If you find any issues or have suggestions for improvement, please open an issue or submit a pull request.
This project is licensed under the MIT License.