mirror of
https://github.com/fatedier/frp.git
synced 2026-01-11 22:23:12 +00:00
assets: use statik to compile static files into binary files
This commit is contained in:
@@ -26,6 +26,7 @@ import (
|
||||
|
||||
docopt "github.com/docopt/docopt-go"
|
||||
|
||||
"github.com/fatedier/frp/src/assets"
|
||||
"github.com/fatedier/frp/src/models/server"
|
||||
"github.com/fatedier/frp/src/utils/conn"
|
||||
"github.com/fatedier/frp/src/utils/log"
|
||||
@@ -130,6 +131,13 @@ func main() {
|
||||
|
||||
log.InitLog(server.LogWay, server.LogFile, server.LogLevel, server.LogMaxDays)
|
||||
|
||||
// init assets
|
||||
err = assets.Load(server.AssetsDir)
|
||||
if err != nil {
|
||||
log.Error("Load assets error: %v", err)
|
||||
os.Exit(1)
|
||||
}
|
||||
|
||||
l, err := conn.Listen(server.BindAddr, server.BindPort)
|
||||
if err != nil {
|
||||
log.Error("Create server listener error, %v", err)
|
||||
|
||||
Reference in New Issue
Block a user