37 lines
1,003 B
Go
37 lines
1,003 B
Go
// This file is part of the happyDomain (R) project.
|
|
// Copyright (c) 2026 happyDomain
|
|
// Authors: Pierre-Olivier Mercier, et al.
|
|
//
|
|
// This program is offered under a commercial and under the AGPL license.
|
|
// For commercial licensing, contact us at <contact@happydomain.org>.
|
|
//
|
|
// For AGPL licensing:
|
|
// This program is free software: you can redistribute it and/or modify
|
|
// it under the terms of the GNU Affero General Public License as published by
|
|
// the Free Software Foundation, either version 3 of the License, or
|
|
// (at your option) any later version.
|
|
|
|
package main
|
|
|
|
import (
|
|
"flag"
|
|
"log"
|
|
|
|
alias "git.happydns.org/checker-alias/checker"
|
|
sdk "git.happydns.org/checker-sdk-go/checker"
|
|
)
|
|
|
|
var listenAddr = flag.String("listen", ":8080", "HTTP listen address")
|
|
|
|
var Version = "custom-build"
|
|
|
|
func main() {
|
|
flag.Parse()
|
|
|
|
alias.Version = Version
|
|
|
|
server := sdk.NewServer(alias.Provider())
|
|
if err := server.ListenAndServe(*listenAddr); err != nil {
|
|
log.Fatalf("server error: %v", err)
|
|
}
|
|
}
|