Skip to content

hamza-rachidi/vehicle-server

Repository files navigation

J'ai changé juste pour vérifier:

Vehicle Server Typescript

Requirements

  • nodejs
  • docker

Running the server

First start a database server

docker run -d -e POSTGRES_USER=vehicle -e POSTGRES_PASSWORD=vehicle -e POSTGRES_DB=vehicle -p 5432:5432 postgis/postgis:16-3.4-alpine

Then, in another terminal start the server

node dist/index.js

Test plan

Create a Vehicle

curl -v -XPOST -H "Content-Type: application/json" --data '{"shortcode":"abbcde", "battery": 12, "latitude": 53.43, "longitude": 43.43}' localhost:8080/vehicles | jq .

List all Vehicles

curl -v localhost:8080/vehicles

Delete a Vehicle

curl -v  -XDELETE localhost:8080/vehicles/${vehicle_id}

About

TP Cours CI/CD

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published