-
Download node.js
-
Download npm
-
(Optional) Download git bash
-
Download PostgresSQL
-
Open git bash, or other terminals
-
Git clone this repo
-
Go to the repo's directory, run the following to install the dependencies.:
npm install
- Run
npm start
-
Select all:
localhost:3000/api/drivers
-
Select one:
localhost:3000/api/drivers/{number}
-
Create:
curl --data "id=2&name=LaoSiJi&age=37&sex=male&carNumber=A1234" \ localhost:3000/api/drivers
-
Update:
curl -X PUT --data "name=MaLuShaShou&age=20&sex=male&carNumber=D8888" \ localhost:3000/api/drivers/{id}
-
Delete:
curl -X DELETE localhost:3000/api/drivers/{id}