Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/watchakorn-18k/go-fiber-supabase
https://github.com/watchakorn-18k/go-fiber-supabase
Last synced: 2 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/watchakorn-18k/go-fiber-supabase
- Owner: watchakorn-18k
- Created: 2024-03-10T17:05:55.000Z (8 months ago)
- Default Branch: master
- Last Pushed: 2024-03-31T15:04:42.000Z (8 months ago)
- Last Synced: 2024-03-31T16:22:39.081Z (8 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
# Go Fiber Supabase Backend
# Install Golang Package
```bash
go mod tidy
```# If you want hot reload
```bash
go install github.com/cosmtrek/air@latest
```# Start APP
```bash
$ go run .
```# ENV
```env
SUPABASE_URL=
SUPABASE_KEY=
DB_PORT_LOGIN=1818
```# Example
## GET http://127.0.0.1:1818/api/course/course-all
- response:
```json
{
"message": "ok",
"data": [
{
"id": "",
"uid": "dfe40a26-2c2e-42d5-92bb-b16bb2235fc0",
"name": "python-101",
"create_at": "",
"price": 100,
"details": "python-101"
},
{
"id": "",
"uid": "43a719fb-9212-45e4-a570-45e748b89583",
"name": "php-101",
"create_at": "",
"price": 0,
"details": "php-101"
}
]
}
```## GET http://127.0.0.1:1818/api/course/get-course?
- query param:
```
name=python-101
```- response:
```json
{
"message": "ok",
"data": {
"id": "",
"uid": "dfe40a26-2c2e-42d5-92bb-b16bb2235fc0",
"name": "python-101",
"create_at": "",
"price": 100,
"details": "python-101"
}
}
```## GET http://127.0.0.1:1818/api/course/lesson-all
- response:
```json
{
"message": "ok",
"data": [
{
"uid": "2f3f80f6-0fce-40f8-a688-de6151e12242",
"name": "บทที่ 1",
"create_at": "",
"course_uid": "dfe40a26-2c2e-42d5-92bb-b16bb2235fc0"
},
.......
]
}
```## GET http://127.0.0.1:1818/api/course/get-lesson?
- query param:
```
course_uid=dfe40a26-2c2e-42d5-92bb-b16bb2235fc0
```- response:
```json
{
"message": "ok",
"data": [
{
"uid": "2f3f80f6-0fce-40f8-a688-de6151e12242",
"name": "บทที่ 1",
"create_at": "",
"course_uid": "dfe40a26-2c2e-42d5-92bb-b16bb2235fc0"
}
]
}
```