mirror of
https://codeberg.org/Codeberg/pages-server.git
synced 2024-11-18 10:29:43 +00:00
35b35c5d67
close #82 close #32 make sure we dont get regressions again ... as we currently have in **main** followups: - create a DNS subdomayn specific to redirect to mock url ... Co-authored-by: 6543 <6543@obermui.de> Reviewed-on: https://codeberg.org/Codeberg/pages-server/pulls/86 Reviewed-by: crapStone <crapstone@noreply.codeberg.org>
31 lines
513 B
Go
31 lines
513 B
Go
package main
|
|
|
|
import (
|
|
"fmt"
|
|
"os"
|
|
|
|
_ "github.com/joho/godotenv/autoload"
|
|
"github.com/urfave/cli/v2"
|
|
|
|
"codeberg.org/codeberg/pages/cmd"
|
|
)
|
|
|
|
// can be changed with -X on compile
|
|
var version = "dev"
|
|
|
|
func main() {
|
|
app := cli.NewApp()
|
|
app.Name = "pages-server"
|
|
app.Version = version
|
|
app.Usage = "pages server"
|
|
app.Action = cmd.Serve
|
|
app.Flags = cmd.ServeFlags
|
|
app.Commands = []*cli.Command{
|
|
cmd.Certs,
|
|
}
|
|
|
|
if err := app.Run(os.Args); err != nil {
|
|
_, _ = fmt.Fprintln(os.Stderr, err)
|
|
os.Exit(1)
|
|
}
|
|
}
|