Skip to content

agendazhang/CarFetching

 
 

Repository files navigation

CarFetching

Guides to setup

  1. Download node.js

  2. Download npm

  3. (Optional) Download git bash

  4. Download PostgresSQL

  5. Open git bash, or other terminals

  6. Git clone this repo

  7. Go to the repo's directory, run the following to install the dependencies.:

npm install
  1. Run npm start

How to call the functions

  1. Select all: localhost:3000/api/drivers

  2. Select one: localhost:3000/api/drivers/{number}

  3. Create: curl --data "id=2&name=LaoSiJi&age=37&sex=male&carNumber=A1234" \ localhost:3000/api/drivers

  4. Update: curl -X PUT --data "name=MaLuShaShou&age=20&sex=male&carNumber=D8888" \ localhost:3000/api/drivers/{id}

  5. Delete: curl -X DELETE localhost:3000/api/drivers/{id}

About

CS2102 Database Systems Project

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • CSS 72.5%
  • JavaScript 14.2%
  • HTML 9.8%
  • PLpgSQL 3.5%