gothem-stack

module
v0.0.0-...-e12b6f5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 24, 2024 License: MIT

README

Description

go version  license

gothem-stack

An end to end htmx and go-templ template using echo for the web server and mage for deployment. Other than that this is unopinionated so bring all your other favorite technologies :)

Go
Templ
HTMX
Echo
Mage

For the frontend libraries it uses tailwindcss and daisyUI for styling. You can easily integrate alpine-js if you desire.

Quickstart

  1. Install npm in your path brew install node; brew install npm
  2. Install mage in your path brew install mage. See https://magefile.org/ for other installation instructions
  3. Run mage install
  4. Run mage run
  5. Open http://localhost:7331 (the server is listening on :4433 but templ injects a watcher with an autoreload script)

When you make changes to your templ files or any of your go code everything will regenerate and then autoreload your web page

How to Use

mage run - Run an interactive development environment that will automatically reload on any file change. Listens on port :4433 and has an autoreload page on :7331

mage install - Install all the dependencies

mage templ - Do a one time regeneration of your templ files

mage build - Do a one time build of the go files

mage tidy - Run go mod tidy

What about persistence?

I usually use postgres and sqlc and they work great. If people start to use this and want to see that added in I'll do so.

But Gotham is spelled with an 'a'....

Yea I know it's spelled with an 'a' :] I was trying to come up with a name that was easier to say and interact with than 'htmx-templ-template' and gothem is what I came up with.

Directories

Path Synopsis
magefiles module
pkg
log

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL