This repository has been archived on 2022-09-04. You can view files and clone it, but cannot push or open issues or pull requests.
api/README.md

33 lines
757 B
Markdown
Raw Normal View History

2020-08-24 11:33:30 +00:00
# TWHelp API
2020-08-25 00:21:24 +00:00
Graphql API for TribalWars servers data.
2020-08-24 11:33:30 +00:00
## Development
2020-08-24 12:07:05 +00:00
**Required env variables to run this API** (you can set them directly in your system or create .env.development file):
2020-08-24 11:33:30 +00:00
```
DB_USER=your_pgdb_user
DB_NAME=your_pgdb_name
DB_PORT=your_pgdb_port
DB_HOST=your_pgdb_host
DB_PASSWORD=your_pgdb_password
REDIS_HOST=your_redis_host
REDIS_PORT=your_redis_port
LIMIT_WHITELIST=127.0.0.1,::1
LOG_DB_QUERIES=[true|false]
```
### Prerequisites
1. Golang
2. PostgreSQL database
3. Configured [cron](https://github.com/tribalwarshelp/cron)
### Installing
1. Clone this repo.
2. Navigate to the directory where you have cloned this repo.
2020-08-24 12:07:05 +00:00
3. Set the required env variables directly in your system or create .env.development file.
2020-08-24 11:33:30 +00:00
4. go run main.go