- Clone this repo
- Run
docker-compose up -d
to start postgres or editdb/database.go
file with your Postgres credentials - Run
main.go
and enjoy.
- JWT based authentication
- Postgres database
- DB migrations
- Auth middleware
- Very minimal logging middleware
- REST API
- Models
Read more about project setup and architecture
-
Run the project
-
POST request
localhost:3000/v1/user/
with JSON body{ "first_name": "Good", "last_name": "Joe", "email": "user.name@gmail.com", "password": "kalasupp1" }
-
POST request
localhost:3000/v1/login
with JSON body{ "email": "user.name@gmail.com", "password": "kalasupp1" }
-
GET request
localhost:3000/v1/secret
and include headerAuthorization
with the value of token received in the previous step. You should get access to the private route.