filer/cmd/web/web.go
2023-08-25 02:26:44 +02:00

24 lines
354 B
Go

package web
import (
"codeberg.org/u1f320/filer/db"
"codeberg.org/u1f320/filer/web"
"github.com/urfave/cli/v2"
)
var Command = &cli.Command{
Name: "web",
Usage: "Serve the web server",
Action: run,
}
func run(c *cli.Context) error {
db, err := db.New()
if err != nil {
return err
}
app := web.New(db)
app.Run(c.Context)
return nil
}