Cumulative loyalty system.
Dependencies:
- Go
1.23
- Docker for PostgreSQL
- Linux or macOS platform
To build a gophermart, run in the terminal:
make build_gophermart # in the root directory of the project
To startup the gophermart, run in the terminal:
./gophermart # in the root directory of the project
To build a accrual, run in the terminal:
make accrual # in the root directory of the project
To startup the accrual, run in the terminal:
./accrual # in the root directory of the project
JWT_SECRET_KEY
– JWT secret key.JWT_LIFETIME
– JWT lifetime. Default1h
DATABASE_URI
|-d
– PostgresSQL DSNRUN_ADDRESS
|-a
– HTTP server address. Defaultlocalhost:8080
LOG_MODE
– Logging mode. Defaultdev
. Valuesinfo
,dev
,warn
,error
CORS_ORIGINS
– List of CORS-origins. Defaulthttp://localhost:3000
WORKERS_COUNT
– Count of workers. Default5
SHUTDOWN_TIMEOUT
– Shutdown timeout. Default5s
To be able to receive updates for autotests and other parts of the template, run the command:
git remote add -m master template https://github.com/yandex-praktikum/go-musthave-group-diploma-tpl.git
To update the autotest code, run the command:
git fetch template && git checkout template/master .github
Then add the changes to your repository.