Skip to content

tushcmd/garage-server

Repository files navigation

Garage Backend

This is a RESTful API built with Node.js, Express, and MongoDB for managing car repair data. It allows you to create, read, update, and delete car repair records. localhost8080

Prerequisites

  • Node.js (v14 or later)
  • MongoDB (v4 or later)

Installation

1.Clone the repository:

 git clone https://github.com/tushcmd/garage-server.git

2.Navigate to the project directory:

 cd garage-server

3.Install the dependencies:

 npm install

4.Create a .env file in the root directory and add the following environment variables:

 PORT=8080
 mongoDBURL=xxxxxxxxxxxxxxxx

Replace the mongoDBURL value with your MongoDB connection string.

Usage

1.Start the development server:

 npm run dev

This will start the server using nodemon for automatic reloading on code changes.

2.The API will be accessible at http://localhost:8080.

API Endpoints

  • GET /cars: Retrieve a list of all cars
  • GET /cars/:id: Retrieve a specific car by ID
  • POST /cars: Create a new car record
  • PUT /cars/:id: Update an existing car record
  • DELETE /cars/:id: Delete a car record

Technologies Used

  • Node.js
  • Express
  • MongoDB
  • Mongoose

Contributing

Contributions are welcome! If you find any issues or have suggestions for improvements, please open an issue or submit a pull request.

Deploy on render

render.com

License

This project is licensed under the MIT License.

About

Garage Server API

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published