mirror of
https://github.com/GopeedLab/gopeed.git
synced 2026-11-04 08:10:55 +00:00
Replace server startup panics with returned errors, print actionable CLI messages with exit status 1, and clarify the API token flags. Add regressions for missing web authentication credentials. Fixes GopeedLab/gopeed#1614
24 lines
387 B
Go
24 lines
387 B
Go
package main
|
|
|
|
import (
|
|
"fmt"
|
|
"os"
|
|
|
|
"github.com/GopeedLab/gopeed/cmd"
|
|
"github.com/GopeedLab/gopeed/pkg/rest/model"
|
|
)
|
|
|
|
// only for local development
|
|
func main() {
|
|
cfg := &model.StartConfig{
|
|
Network: "tcp",
|
|
Address: "127.0.0.1:9999",
|
|
Storage: model.StorageBolt,
|
|
WebEnable: true,
|
|
}
|
|
if err := cmd.Start(cfg); err != nil {
|
|
fmt.Fprintln(os.Stderr, err)
|
|
os.Exit(1)
|
|
}
|
|
}
|