Files
proxypool/main.go
2020-08-13 08:18:52 +08:00

24 lines
396 B
Go

package main
import (
"flag"
"fmt"
"github.com/zu1k/proxypool/api"
"github.com/zu1k/proxypool/app"
)
func main() {
filePath := flag.String("c", "", "path to config file: source.yaml")
flag.Parse()
if *filePath == "" {
app.NeedFetchNewConfigFile = true
} else {
app.InitConfigAndGetters(*filePath)
}
go app.Cron()
fmt.Println("Do the first crawl...")
app.CrawlGo()
api.Run()
}