Back-end for Car-Models, an api to collect racing logs.
- Clone this repository
- Install all dependencies
npm i
-
Create a PostgreSQL database with whatever name you want
-
Configure the
.env
file using the.env.example
file -
Run the back-end in a development environment:
npm run dev
POST: /racer - Create a new racer Body: { name: string; birth: Date; number: number }
PUT: /racer/:id - Update a racer Body: { number: number }
POST: /circuit - Create a new circuit Body: { track: number; racer: number; car: number; time: number; }
DELETE: /circuit/:id - Delete a circuit
GET: /ranking/:trackId - Get the ranking of a track