config.conf 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. [http]
  2. # Listen address
  3. listen = "0.0.0.0:8080"
  4. [sequence_db]
  5. # Mysql sequence generator DSN
  6. dsn = "sequence:sequence@tcp(127.0.0.1:3306)/sequence"
  7. # Mysql connection pool max idle connection
  8. max_idle_conns = 4
  9. # Mysql connection pool max open connection
  10. max_open_conns = 4
  11. [short_db]
  12. # Mysql short service read db DSN
  13. read_dsn = "shortme_w:shortme_w@tcp(127.0.0.1:3306)/shortme"
  14. # Mysql short service write db DSN
  15. write_dsn = "shortme_r:shortme_r@tcp(127.0.0.1:3306)/shortme"
  16. # Mysql connection pool max idle connection
  17. max_idle_conns = 8
  18. # Mysql connection pool max open connection
  19. max_open_conns = 8
  20. [common]
  21. # short urls that will be filtered to use
  22. black_short_urls = ["version","health","short","expand","css","js","fuck","stupid"]
  23. # Base string used to generate short url
  24. # base_string = "Ds3K9ZNvWmHcakr1oPnxh4qpMEzAye8wX5IdJ2LFujUgtC07lOTb6GYBQViSfR"
  25. base_string = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"
  26. # Short url service domain name. This is used to filter short url loop.
  27. domain_name = "127.0.0.1:8080"
  28. # Short url service schema: http or https.
  29. schema = "http"