letsgo

command module
v0.0.0-...-3c6d5b9 Latest Latest
Warning

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

Go to latest
Published: Jan 8, 2025 License: GPL-3.0 Imports: 1 Imported by: 0

README

letsgo

A tool to help build go web applications quickly.

Running this will create a go app with a Postgres database for local development, all in Docker containers.

Usage

Prerequisites

letsgo requires Go 1.23 or higher installed. letsgo also assumes that docker compose will run with a reasonably up to date version.

Building

After cloning the repository, run make build to build, then move letsgo to somewhere in your path.

Usage
Generating a project

letsgo make $projectname $projectRepository Example: letsgo make something-cool github.com/nmusey/something-cool

Everything is Dockerized so you shouldn't have to install any dependencies locally.

New packages

letsgo make $package Example: letsgo make product

Adding templating

letsgo uses templ for templating. Hot reloading with Air is enabled by default. letsgo templ && templ generate

Migrations

letsgo uses migrate for database migrations. By default these are run when you POST /migrate. This is convenient for local development but should be migrated when moving to production.

migrate is not necessary locally but is preferred. You can always make migrations by copying the default files, but installing and running the tool is easier.

Future Features

  • Support for other databases is not planned right now
  • Support for other frameworks is not planned right now

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
_templates
app/cmd/http command
internal
cli

Jump to

Keyboard shortcuts

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