No description
Find a file
kekskurse 360ee1c5fe
Some checks failed
continuous-integration/drone/push Build is failing
stuff
2021-11-25 01:32:48 +01:00
database/migrations Stuff 2021-11-24 03:27:07 +01:00
pkg stuff 2021-11-25 01:32:48 +01:00
static init 2021-11-03 02:10:36 +01:00
templates stuff 2021-11-25 01:32:48 +01:00
vendor stuff 2021-11-25 01:32:48 +01:00
.air.toml Auto reload 2021-11-09 17:20:18 +01:00
.drone.yml Docker image 2021-11-09 17:03:13 +01:00
.gitignore Auto reload 2021-11-09 17:20:18 +01:00
docker-compose.yml Refactory and mail 2021-11-22 23:11:37 +01:00
Dockerfile Add Docker file 2021-11-09 13:16:59 +01:00
go.mod Stuff 2021-11-24 03:27:07 +01:00
go.sum Stuff 2021-11-24 03:27:07 +01:00
main.go stuff 2021-11-25 01:32:48 +01:00
Makefile Auto reload 2021-11-09 17:20:18 +01:00
readme.md Refactory and mail 2021-11-22 23:11:37 +01:00

Sample Webapplication in Go

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

Structur

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

Features

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

JWT-Auth

todo

Migrations

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

https://hub.docker.com/r/kekskurse/go-sample-webpage

Next Steps

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