init
This commit is contained in:
commit
49b24e5773
22 changed files with 1499 additions and 0 deletions
24
cmd/web/web.go
Normal file
24
cmd/web/web.go
Normal file
|
@ -0,0 +1,24 @@
|
|||
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
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue