mirror of
https://github.com/halejohn/Cloudreve.git
synced 2026-01-26 09:34:57 +08:00
Feat: eject internal static files
This commit is contained in:
12
main.go
12
main.go
@@ -8,15 +8,25 @@ import (
|
||||
"github.com/HFO4/cloudreve/routers"
|
||||
)
|
||||
|
||||
var confPath string
|
||||
var (
|
||||
isEject bool
|
||||
confPath string
|
||||
)
|
||||
|
||||
func init() {
|
||||
flag.StringVar(&confPath, "c", util.RelativePath("conf.ini"), "配置文件路径")
|
||||
flag.BoolVar(&isEject, "eject", false, "导出内置静态资源")
|
||||
flag.Parse()
|
||||
bootstrap.Init(confPath)
|
||||
}
|
||||
|
||||
func main() {
|
||||
if isEject {
|
||||
// 开始导出内置静态资源文件
|
||||
bootstrap.Eject()
|
||||
return
|
||||
}
|
||||
|
||||
api := routers.InitRouter()
|
||||
|
||||
// 如果启用了SSL
|
||||
|
||||
Reference in New Issue
Block a user