filer/cmd/web/web.go

25 lines
354 B
Go
Raw Normal View History

2023-08-25 02:25:38 +02:00
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
}