Skip to content

reed-only/go

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Go API Server

Install go

brew install golang

Fetch Dependencies

go get github.com/gorilla/mux

Run API Server

go run *.go

Try It Out

Visit localhost:8080/cars

Get All Cars

curl http://localhost:8080/cars

Get a Single Car

curl http://localhost:8080/cars/1

Create a Car (Not supported yet)

curl -X POST -H "Content-Type: application/json" -d '{"id": 3, "make": "Alfa Romeo", "model": "8C", "year": 2017, "transmission": {"type": "Dual Dry Clutch", "gears": 6}}' http://localhost:8080/cars

Delete a Car

curl -X DELETE http://localhost:8080/cars/1

About

Go API Server

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages