Chronologger is a personal review app, built with Golang.
You can get up and running using make
, use make help
to see a list of options.
- Install Golang using asdf /
asdf plugin add golang && asdf install
- Install Templ from the docs /
go install github.com/a-h/templ/cmd/templ@v0.2.598
- Install Docker
- Install SASS CLI from the docs /
brew install sass/sass/sass
- Start your docker.
- Start the docker containers using
make up
. - Start the application with hot module reloading using
make hmr
.
Alternatively, if you don't need hot module reloading, you can just run go run .
or make start
To view a collection, enter the mongo cli with make dbCli
and run the following:
use chronologger
db.templates.find()
Due to the way templ
s watch feature works, the generated go code will look different when running a watch instead of a standard templ generate
.
Because of this, it's recommended to run make build
before committing code.
Note: The differently generated code would work in production, but it's not recommended to commit it as it's less performant.
To add tests, create a file with the suffix _test.go
next to the file you're testing, and run make test
to run the tests.