mirror of
https://github.com/truecharts/charts.git
synced 2026-07-31 10:21:21 -03:00
25 lines
474 B
Go
25 lines
474 B
Go
package main
|
|
|
|
import (
|
|
"flag"
|
|
"fmt"
|
|
"log"
|
|
"net/http"
|
|
|
|
"my-proxy-service/internal/config"
|
|
"my-proxy-service/internal/proxy"
|
|
"my-proxy-service/internal/utils"
|
|
)
|
|
|
|
func main() {
|
|
flag.Parse()
|
|
|
|
config.LoadConfig()
|
|
|
|
go utils.WatchFile()
|
|
|
|
http.HandleFunc(config.ROUTES.INDEX, proxy.HandleProxy)
|
|
http.HandleFunc(config.ROUTES.HEALTH, proxy.HealthCheckHandler)
|
|
log.Fatal(http.ListenAndServe(fmt.Sprintf(":%d", config.Port), nil))
|
|
}
|