Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/emarifer/go-htmx-trivia
Simple web application full-stack to play Trivia + API with Supabase as database + CRUD, made with Go Fiber, HTML template rendering and </> htmx & _hyperscript.
https://github.com/emarifer/go-htmx-trivia
daisyui fiber-framework go go-fiber golang htmx hyperscript supabase tailwindcss template-engine-html validator
Last synced: about 2 months ago
JSON representation
Simple web application full-stack to play Trivia + API with Supabase as database + CRUD, made with Go Fiber, HTML template rendering and </> htmx & _hyperscript.
- Host: GitHub
- URL: https://github.com/emarifer/go-htmx-trivia
- Owner: emarifer
- License: mit
- Created: 2023-10-18T11:23:18.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2023-10-19T12:04:32.000Z (about 1 year ago)
- Last Synced: 2023-10-19T13:25:35.263Z (about 1 year ago)
- Topics: daisyui, fiber-framework, go, go-fiber, golang, htmx, hyperscript, supabase, tailwindcss, template-engine-html, validator
- Language: HTML
- Homepage:
- Size: 76.2 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Golang Fiber Full-stack Web App
### Simple web application full-stack to play Trivia + API with Supabase as database + CRUD, made with Go Fiber, HTML template rendering and > htmx & _hyperscript.
---
### Setup:
Besides the obvious prerequisite of having Go!, you must have Air installed for hot reloading when editing code.
On the other hand, you must have an account in Supabase and within a project you must create the "facts" table using the following SQL statement:
```
create table
public.facts (
id bigint generated by default as identity,
created_at timestamp with time zone not null default now(),
question text not null,
answer text not null,
constraint facts_pkey primary key (id),
constraint facts_id_key unique (id)
) tablespace pg_default;
```The access credentials to your Supabase project must appear in an .env file:
```
SUPABASE_URL=xxxx
SUPABASE_KEY=xxxx
```---
#### Start the App in development mode:
```
$ air # Ctrl + C to stop the app
```#### Compile for production:
```
$ go build -ldflags="-s -w" -o ./cmd/main ./cmd/main.go # ./cmd/main to run the app
```