jlelse
/
MailyGo
Archived
1
Fork 0
This repository has been archived on 2024-01-02. You can view files and clone it, but cannot push or open issues or pull requests.
MailyGo/mailygo.go

26 lines
395 B
Go
Raw Normal View History

2020-03-14 21:26:34 +00:00
package main
import (
"log"
"net/http"
"strconv"
)
2020-04-12 10:34:51 +00:00
var appConfig *config
2020-03-14 21:26:34 +00:00
func init() {
cfg, err := parseConfig()
if err != nil {
log.Fatal(err)
}
appConfig = cfg
}
func main() {
if !checkRequiredConfig(appConfig) {
log.Fatal("Not all required configurations are set")
}
http.HandleFunc("/", FormHandler)
log.Fatal(http.ListenAndServe(":"+strconv.Itoa(appConfig.Port), nil))
}