Files
torrent-indexer/main.go

23 lines
498 B
Go
Raw Normal View History

2022-04-21 15:14:49 -03:00
package main
import (
"net/http"
handler "github.com/felipemarinho97/torrent-indexer/api"
"github.com/felipemarinho97/torrent-indexer/cache"
2022-04-21 15:14:49 -03:00
)
func main() {
redis := cache.NewRedis()
indexers := handler.NewIndexers(redis)
2022-04-21 15:14:49 -03:00
http.HandleFunc("/", handler.HandlerIndex)
http.HandleFunc("/indexers/comando_torrents", indexers.HandlerComandoIndexer)
2023-10-01 20:27:44 +00:00
http.HandleFunc("/indexers/bludv", indexers.HandlerBluDVIndexer)
2022-04-21 15:14:49 -03:00
err := http.ListenAndServe(":7006", nil)
if err != nil {
panic(err)
}
}