Discover Packages
github.com/WannaFight/snippetbox
module
Version:
v0.0.0-...-17ab5b7
Opens a new window with list of versions in this module.
Published: Mar 26, 2024
License: MIT
Opens a new window with license information.
README
README
¶
Snippetbox app
Simple app from Alex Edward's book "let's Go". Written in Go 1.22
How to run
Just use docker compose, this will create MySQL and Go backend services. All Go files are watched by air : any changes will be detected and app will rebuild
docker compose up -d
App can be found on https://localhost:4000 (yes, it has self-signed certificate)
Powered by
Project structure
cmd/web
Core logic of app
handlers.go, routes.go – logic of handlers and URL patterns
middleware.go – some middlewares, e.g. logging, authentication and permission checks
templates.go – helpers functions for templates
helpers.go - useful shortcuts, e.g. serverError
and render
internal
models representation, SQL
functions for testing
validation
ui
HTML with Go templating
Expand ▾
Collapse ▴
Directories
¶
cmd
internal
Click to show internal directories.
Click to hide internal directories.