kpie

package module
v0.0.0-...-8ba248a Latest Latest
Warning

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

Go to latest
Published: Jan 16, 2024 License: MIT Imports: 8 Imported by: 0

README

Go + Tailwind

This is a starting point for a simple Go application with the following traits:

  • Gin web application
  • Stimulus JS
  • Tailwind CSS
  • Procfile (for running a dev server)

The Procfile relies on 'gowatch' to reload the app server, and runs both tailwind and esbuild to rebuild assets on the fly.

Bootstrap

# Install gowatch for app reloading
go install github.com/silenceper/gowatch@latest

# NPM dependencies for tailwind + esbuild
yarn install

# start server
foreman start

TODO

  • Add configuration options
  • Add Makefile (for builds)
  • Add Dockerfile

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	//go:embed dist/assets
	StaticAssetsFS embed.FS

	//go:embed templates
	StaticTemplateFS embed.FS
)

Functions

func AssetsFS

func AssetsFS() fs.FS

func TemplatesFS

func TemplatesFS() fs.FS

Types

type Handler

type Handler struct {
	*sqlx.DB
}

func NewHandler

func NewHandler() *Handler

func (*Handler) Index

func (h *Handler) Index(c *gin.Context)

Index is the handler for the root path

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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