I want to hit a btn to deploy an amazing product! This repo is still under developement! Don't use it :)
For dev env use this command for database setup:
docker compose up -dI use golang-migrate/migrate package for migrations. You can run it with docker:
docker run -v $PWD/database/migrations:/migrations \
--network host \
migrate/migrate \
-path=/migrations \
-database "postgres://postgres:postgres@localhost:5432/go?sslmode=disable" \
upI use Air for live reloading. So you just need to run air in dev env to run it...
I am using chi for routing.
I wanna use JWT tokens for authentication:
go get github.com/golang-jwt/jwt/v5- Handle exceptions better
- Refactor a bit
- Use a package for routing
- Create a middleware for auth
- Write some tests
- Use a package for env vars
- Encrypt passwords
- More info in the token, like name and email
- Better logging
- Metrics
- Use a package for validation
- Rate limiter for login and register
If you wanna test sth on the fly, you can do it here: https://go.dev/play/