/
config.yaml
33 lines (29 loc) · 933 Bytes
/
config.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
# :: SERVICE ::
# Key passed as query param to access endpoints
AUTH_KEY: "shorty"
# The base url used by short urls to produce full url
BASE_URL: "http://localhost:8080"
# Minimum size of hash code for short url
HASH_MIN: 5
# Seed used to start url hash (unique make it less predicable)
HASH_SALT: "$h0rtur1$"
# Server name and port
SERVER_ADDR: ":8080"
# Store to use - badger|mongo
STORE: "badger"
# :: MONGO DB ::
# MongoDb address
MONGO_URL: "mongodb://localhost:28017"
# Name of the mongo database
MONGO_DB: "shorturls"
# [!] Mongo caches queries to reduce calls to database
# Number of minutes the short url request is kept in memory (mongo only)
MONGO_CACHE_EXP: 15
# Number of minutes cleanup should remove expired urls (mongo only)
MONGO_CACHE_CLEANUP: 60
# [!] Mongo uses two collections
MONGO_COL_COUNTERS: "counters"
MONGO_COL_LINKS: "links"
# :: BADGER ::
# Path to store Badger database
BADGER_DIR: "./data/badger"