The armory backend is responsible for storing and parsing d2s characters. It also exposes an HTTP API to get characters as JSON.
| Name | Default |
|---|---|
| HTTP_ADDRESS | :80 |
| MONGO_HOST | mongodb:27017 |
| MONGO_DB | armory |
| MONGO_USERNAME | |
| MONGO_PASSWORD | |
| D2S_PATH | |
| CACHE_DURATION | 3m |
| STATISTICS_USER | |
| STATISTICS_PASSWORD | |
| CORS_ENABLED | false |
| LOG_REQUESTS | false |
Gets the character by name, either served through the mongoDB cache or by parsing the d2s binary if the cache duration has expired.
GET /api/v1/characters?name=nokkaDeprecated handler used by < v1.0.0 users.
GET /retrieving/v1/character?name=nokkaGET /healthgodephgraph is used to generate the dependency graph.
$ godepgraph -nostdlib -novendor -horizontal -onlyprefixes=github.com/nokka/d2-armory-api github.com/nokka/d2-armory-api/cmd/server | dot -Tpng -o docs/godepgraph.pngThe armory API relies on mongodb to store the data.
