mirror of
https://github.com/GopeedLab/gopeed.git
synced 2026-11-05 16:15:43 +00:00
30 lines
440 B
Go
30 lines
440 B
Go
//go:build web
|
|
// +build web
|
|
|
|
package main
|
|
|
|
import (
|
|
"embed"
|
|
"github.com/GopeedLab/gopeed/cmd"
|
|
"github.com/GopeedLab/gopeed/pkg/rest/model"
|
|
"io/fs"
|
|
)
|
|
|
|
//go:embed dist/*
|
|
var dist embed.FS
|
|
|
|
func main() {
|
|
sub, err := fs.Sub(dist, "dist")
|
|
if err != nil {
|
|
panic(err)
|
|
}
|
|
cfg := &model.StartConfig{
|
|
Network: "tcp",
|
|
Address: "0.0.0.0:9999",
|
|
Storage: model.StorageBolt,
|
|
WebEnable: true,
|
|
WebFS: sub,
|
|
}
|
|
cmd.Start(cfg)
|
|
}
|