2021-03-16 19:22:06 +00:00
|
|
|
package main
|
|
|
|
|
|
|
|
import (
|
|
|
|
"os"
|
|
|
|
|
2022-06-11 21:17:43 +00:00
|
|
|
_ "github.com/joho/godotenv/autoload"
|
2024-02-15 16:08:29 +00:00
|
|
|
"github.com/rs/zerolog/log"
|
2021-12-05 13:45:17 +00:00
|
|
|
|
2024-02-15 16:08:29 +00:00
|
|
|
"codeberg.org/codeberg/pages/cli"
|
|
|
|
"codeberg.org/codeberg/pages/server"
|
2021-03-16 19:22:06 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
func main() {
|
2024-02-15 16:08:29 +00:00
|
|
|
app := cli.CreatePagesApp()
|
|
|
|
app.Action = server.Serve
|
2021-11-20 14:54:52 +00:00
|
|
|
|
2021-12-03 01:12:51 +00:00
|
|
|
if err := app.Run(os.Args); err != nil {
|
2024-02-15 16:08:29 +00:00
|
|
|
log.Error().Err(err).Msg("A fatal error occurred")
|
2021-12-03 01:12:51 +00:00
|
|
|
os.Exit(1)
|
2021-03-16 19:22:06 +00:00
|
|
|
}
|
|
|
|
}
|