# Packages
No description provided by the author
# README
go-fullstack-boilerplate
A template to scaffold a fullstack golang web application.
Features
- Standard Go Project Layout
- Postgresql database using database/sql with pgx driver
- Router based on net/http ServeMux
- Templating based on html/template
- Optimized css and js builds
- Database migrations
- Hot reloading
Requirements
- Go version 1.22 or higher
- Docker or Podman
- esbuild
Usage
- Install the cli tools.
make install
- Rename .env.example to .env.
mv .env.example .env
- Change the database password (DB_PASS).
# .env
DB_PASS=CHANGE_ME
- Start the database.
make db
- Run the server in development mode.
make dev
- Open the web application at localhost:8888.
Migrations
Creating Migrations
Run the migration target with the name argument set to the name of the migration.
make migration name=create_users_table
Running Migrations
Run the migrate target.
make migrate
Rolling Back Migrations
Run the rollback target.
make rollback
Running Tests
make test
Other Tasks
Consult the Makefile.
Linting
This project comes with a golangci-lint config file. Just install golangci-lint to use it.