https://github.com/nxhawk/golang-rest-api
https://github.com/nxhawk/golang-rest-api
backend golang rest rest-api restful-api
Last synced: 23 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/nxhawk/golang-rest-api
- Owner: nxhawk
- Created: 2022-05-29T15:40:27.000Z (about 4 years ago)
- Default Branch: master
- Last Pushed: 2022-05-29T15:45:04.000Z (about 4 years ago)
- Last Synced: 2025-01-12T05:08:18.239Z (over 1 year ago)
- Topics: backend, golang, rest, rest-api, restful-api
- Language: Go
- Homepage:
- Size: 1.95 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Simple GO Lang REST API
> Simple RESTful API to create, read, update and delete books. No database implementation yet
## Quick Start
``` bash
# Install mux router
go get -u github.com/gorilla/mux
```
``` bash
go build
./go_restapi
```
## Endpoints
### Get All Books
``` bash
GET api/books
```
### Get Single Book
``` bash
GET api/books/{id}
```
### Delete Book
``` bash
DELETE api/books/{id}
```
### Create Book
``` bash
POST api/books
# Request sample
# {
# "isbn":"4545454",
# "title":"Book Three",
# "author":{"firstname":"Harry", "lastname":"White"}
# }
```
### Update Book
``` bash
PUT api/books/{id}
# Request sample
# {
# "isbn":"4545454",
# "title":"Updated Title",
# "author":{"firstname":"Harry", "lastname":"White"}
# }
```
```
## App Info
### Author
Brad Traversy
[Traversy Media](http://www.traversymedia.com)
### Version
1.0.0
### License
This project is licensed under the MIT License