- Install direnv and set hook at your shell. (Option)
$ brew install direnv $ echo export JWT_SECRET="{your_cecret_key}" > .envrc $ direnv allow .
-
Start Postgres
$ docker-compose up
-
Run server
$ go run main.go
curl --location --request POST 'localhost:8888/signup' \
--form 'email=test@example.com' \
--form 'password=abcd123' \
--form 'username=test'
curl --location --request POST 'localhost:8888/login' \
--form 'email=test@example.com' \
--form 'password=abcd123'
curl --location --request GET 'localhost:8888/v1/me' \
--header 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJlbWFpbCI6InRlc3Q2QHNhbXBsZS5jb20iLCJhY2NvdW50X2lkIjo4LCJleHAiOjE2MTUxMjA3Mjh9.mgYfZVWZ_Uec5GBtWE02n2R5v-Air_A5mw2uKW-4tVA'