https://github.com/prongbang/fiber-example
gofiber example
https://github.com/prongbang/fiber-example
Last synced: 8 months ago
JSON representation
gofiber example
- Host: GitHub
- URL: https://github.com/prongbang/fiber-example
- Owner: prongbang
- License: mit
- Created: 2020-08-15T17:49:43.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2020-08-15T17:52:50.000Z (over 5 years ago)
- Last Synced: 2025-03-25T22:52:04.337Z (8 months ago)
- Language: Go
- Size: 24.4 KB
- Stars: 3
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# fiber-example
https://gofiber.io/
## Run
```bash
$ make dev
```
## API
- Post
```bash
curl --request POST 'localhost:3000/api/v1/todo' \
--header 'Content-Type: application/json' \
--data-raw '{
"id": 1,
"name": "Todo 1"
}'
```
- Get
```bash
curl --request GET 'localhost:3000/api/v1/todo/1'
```
- Put
```bash
curl --request PUT 'localhost:3000/api/v1/todo/69' \
--header 'Content-Type: application/json' \
--data-raw '{
"name": "Todo 1"
}'
```
- Patch
```bash
curl --request PATCH 'localhost:3000/api/v1/todo/96' \
--header 'Content-Type: application/json' \
--data-raw '{
"name": "Todo 1"
}'
```
- Delete
```bash
curl --request DELETE 'localhost:3000/api/v1/todo/99' \
--header 'Content-Type: application/json' \
--data-raw '{
"name": "Todo 1"
}'
```