New env variable FIC_BASEURL to change the base URL

This commit is contained in:
nemunaire 2021-07-21 12:30:51 +02:00
parent 74ae52ef41
commit 8f1b44e3dd
12 changed files with 165 additions and 77 deletions

View file

@ -61,6 +61,11 @@ func StripPrefix(prefix string, h http.Handler) http.Handler {
}
func main() {
// Read paremeters from environment
if v, exists := os.LookupEnv("FIC_BASEURL"); exists {
BaseURL = v
}
// Read parameters from command line
var bind = flag.String("bind", "127.0.0.1:8083", "Bind port/socket")
var dsn = flag.String("dsn", fic.DSNGenerator(), "DSN to connect to the MySQL server")