A CRUD API template for perform operations on users. Written in golang.
- Server: Golang with go-chi as mux and zap for logging
- JWT auth with go-chi/jwtauth
- Posgres with go-pg library
- Make sure docker is installed and then run
docker compose up --build
from base of the repo. - Server should be up on
localhost:8000/
curl -X POST http://localhost:8000/signup -v\
-H 'Content-Type: application/json' \
-d '{"email":"test@example.com","password":"somepass","firstName":"John","lastname":"Doe"}'
curl -X POST http://localhost:8000/login -v\
-H 'Content-Type: application/json' \
-d '{"email":"test@example.com","password":"somepass"}'
curl -X PUT http://localhost:8000/users -v\
-H 'Authorization: BEARER <token>' \
-H 'Content-Type: application/json' \
-d '{"firstName":"Johny","lastname":"Doesnt"}'