Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/agostinhomarcia/back-end-car-reservations
This is the backend for the car booking system. This project provides a RESTful API for managing car bookings, allowing you to create, update, delete and list bookings.
https://github.com/agostinhomarcia/back-end-car-reservations
axios cors expressjs nodejs
Last synced: about 14 hours ago
JSON representation
This is the backend for the car booking system. This project provides a RESTful API for managing car bookings, allowing you to create, update, delete and list bookings.
- Host: GitHub
- URL: https://github.com/agostinhomarcia/back-end-car-reservations
- Owner: agostinhomarcia
- License: mit
- Created: 2024-07-14T13:35:26.000Z (7 months ago)
- Default Branch: main
- Last Pushed: 2024-09-09T11:18:54.000Z (5 months ago)
- Last Synced: 2024-12-07T09:09:40.611Z (about 2 months ago)
- Topics: axios, cors, expressjs, nodejs
- Language: JavaScript
- Homepage: https://back-end-car-reservations.vercel.app
- Size: 2.76 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
About |
Features |
Technologies |
Requirements |
Starting |
License |
Author |
Projeto
# Car Reservation Backend
Este é o backend para o sistema de reservas de carros. Este projeto fornece uma API RESTful para gerenciar reservas de carros, permitindo criar, atualizar, deletar e listar reservas.
## Tecnologias
- Node.js
- Express.js
- Body-parser
- CORS## Funcionalidades
- **Criar Reserva:** Permite criar uma nova reserva de carro.
- **Listar Reservas:** Permite listar todas as reservas de carros.
- **Atualizar Reserva:** Permite atualizar uma reserva existente.
- **Deletar Reserva:** Permite deletar uma reserva existente.## Instalação
Siga as instruções abaixo para rodar o projeto na sua máquina local.
### Pré-requisitos
- Node.js (https://nodejs.org/)
- npm (https://www.npmjs.com/)### Passos para Instalação
1. Clone o repositório para a sua máquina local:
```bash
git clone https://github.com/agostinhomarcia/back-end-car-reservations.git
```2. Navegue até o diretório do projeto:
```bash
cd back-end-car-reservations
```3. Instale as dependências do projeto:
```bash
npm install
```4. Inicie o servidor:
```bash
node server.js
```5. O servidor estará rodando na porta 3000. Você pode acessar a API em `http://localhost:3000`.
## Endpoints da API
### Criar uma Nova Reserva
- **URL:** `/reservations`
- **Método:** `POST`
- **Corpo da Requisição:**
```json
{
"car": "Carro 1",
"model": "Sedan",
"year": "2020",
"startDate": "2024-07-20T00:00:00.000Z",
"endDate": "2024-07-25T00:00:00.000Z",
"pricePerDay": 50,
"totalPrice": 250
}
```### Deletar uma Reserva
URL: /reservations/:id
Método: DELETE
## :memo: License
This project is under the [MIT license](./License).
Made with love by [Márcia Agostinho](https://github.com/agostinhomarcia) 🚀.