krz/skunky-art
Alternative privacy frontend for DeviantArt.
clone: git clone https://gitbay.org/krz/skunky-art.git
v1.3.4: main.go · raw
1package main
2
3import (
4 "skunkyart/app"
5 "skunkyart/static"
6 "time"
7
8 "github.com/zerolabsco/devianter"
9)
10
11func main() {
12 app.Release.Version = "1.3.2"
13 app.Release.Description = "Two API endpoints and template embedding into binary"
14 go app.RefreshInstances()
15
16 app.ExecuteCommandLineArguments()
17 app.ExecuteConfig()
18 static.CopyTemplatesToMemory()
19
20 // Rate/concurrency-limit + time-out outbound DeviantArt requests so bot floods
21 // can't exhaust the process or get our egress IP banned by CloudFront/WAF.
22 app.InstallDAThrottle()
23
24 go func() {
25 for {
26 err := devianter.UpdateCSRF()
27 if err != nil {
28 println(err.Error())
29 }
30 time.Sleep(12 * time.Hour)
31 }
32 }()
33
34 app.Router()
35}