This is the backend of the project written in Golang, everything is unit tested.
Note to myself for my next web project:
Store useful variables (db, userid, username, errors has occurred) inside a structure
Create a lib to handle easily and in standardised way the database requests
You must have Golang, PostgreSQL and Redis installed/started.
psql -f setup_db.sql
export DB_NAME=db_matcha
export DB_NAME_TEST=db_matcha_tests
export MJ_APIKEY_PUBLIC=<your_mailjet_api_key_public>
export MJ_APIKEY_PRIVATE=<your_mailjet_api_key_private>
export JWT_SECRET=ItsTheJWTSecret
cd server/api
make vendor_get
make run
make test
# OR
make test-verbose
cd server/websocket
make vendor_get
make run
make test
# OR
make test-verbose