Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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.

Awesome Lists containing this project

README

        


movie


Github top language

Github language count

License

Github issues


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) 🚀.


movies

 

Back to top