You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Kekskurse 360ee1c5fe
1 year ago
database/migrations Stuff 1 year ago
pkg stuff 1 year ago
static init 1 year ago
templates stuff 1 year ago
vendor stuff 1 year ago
.air.toml Auto reload 1 year ago
.drone.yml Docker image 1 year ago
.gitignore Auto reload 1 year ago
Dockerfile Add Docker file 1 year ago
Makefile Auto reload 1 year ago
docker-compose.yml Refactory and mail 1 year ago
go.mod Stuff 1 year ago
go.sum Stuff 1 year ago
main.go stuff 1 year ago Refactory and mail 1 year ago

Sample Webapplication in Go

Sample Webapplication in go, create a kind of skeleton for monolith webapplicaion. Useed to create a small MVP Project.


Create (self contained) pkg for a group of pages. The pkg included the View and Go files for the Pages e.g. user pages.

Including Packages


Global Layout

The "globale layout" is put arround each response from a pkg web response. It read the response buffer from and use the content to parse the layout.tmpl. It works via middelware




Its possitlbe to execute the migrations via go run ./ migrate. It execute the migration files in database/migrations/*.sql

One Binary

Everything (include templaes and migration) can be added in one binary

Make commands

  • build -> Build webapp
  • init-dev -> Start docker copose
  • run-dev -> Run Webapp with reload if someting is change (air)

Docker Image

Next Steps

  • conifg per env
  • argument config?
  • make nice user register and login page
  • make nice