Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/vinicius77/go-brainstorm
Struggling with Go (initial pain)
https://github.com/vinicius77/go-brainstorm
Last synced: 9 days ago
JSON representation
Struggling with Go (initial pain)
- Host: GitHub
- URL: https://github.com/vinicius77/go-brainstorm
- Owner: vinicius77
- Created: 2024-05-05T19:03:10.000Z (7 months ago)
- Default Branch: master
- Last Pushed: 2024-05-06T18:44:42.000Z (7 months ago)
- Last Synced: 2024-05-06T20:23:09.070Z (7 months ago)
- Language: Go
- Size: 10.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
#### Initiate Project
```bash
go mod init github.com/vinicius77/go-brainstorm
```#### Install Fiber V2
```bash
go get -u github.com/gofiber/fiber/v2
```#### Install modules
```bash
go mod tidy
```#### Run the application
```bash
go run cmd/api/main.go
```##### CURL Examples
### TODOS (Fiber)
##### Create
```bash
curl --header "Content-Type: application/json" \
--request POST \
--data '{"title":"curl request","body":"Post request"}' \
http://localhost:4000/api/todos
```##### Get
```bash
curl -i "http://localhost:4000/api/todos"
```##### Patch
```bash
curl --header "Content-Type: application/json" \
--request PATCH \
"http://localhost:4000/api/todos/1/done
```### Coins Balance (Chi)
##### Get
```bash
curl --header "Content-Type: application/json" \
--header "Authorization: 123ABC" \
--request GET \
"http://localhost:8000/account/coins/?username=vinicius
```