Skip to content

Latest commit

 

History

History
58 lines (44 loc) · 1.08 KB

README.md

File metadata and controls

58 lines (44 loc) · 1.08 KB

Ngo_Koshan_Klassen_WS2223

Ausführung:

  1. Clonen Sie das Repository mithilfe von git clone .
  2. Navigieren Sie in das Root-Verzeichnis.
  3. Laden Sie alle dependencies mithilfe von npm i herunter.
  4. Starten Sie den Server mithilfe von npm run server
  5. Der Server ist nun auf Port 3000 verfügbar

Benutzung:

GET
http://localhost:3000/car
http://localhost:3000/driver
http://localhost:3000/sight

GET - Bestimmtes Objekt erhalten

http://localhost:3000/car/{id}
http://localhost:3000/driver{id}

POST-Beispiel für einen Fahrer http://localhost:3000/driver

{
    "driverId": 1,
    "name": "Fabian",
    "age": 24,
    "carId": 3,
    "budget": 20,
    "currentPos": {
      "lat": 51.02289632984686,
      "lng": 7.562342790969774
    }
  }

POST-Beispiel für ein Auto http://localhost:3000/car

 {
    "carId": 1,
    "name": "BMW",
    "fuelType": "Diesel",
    "minConsumPer100Kilometers": 8,
    "maxConsumPer100Kilometers": 24
  }

DELETE
http://localhost:3000/car
http://localhost:3000/driver