|
|
@ -5,6 +5,7 @@ import ( |
|
|
|
"fmt" |
|
|
|
"github.com/kardianos/service" |
|
|
|
"github.com/kataras/iris" |
|
|
|
"lapp_-wy/db" |
|
|
|
"lapp_-wy/inits/parse" |
|
|
|
"lapp_-wy/utils" |
|
|
|
"lapp_-wy/web/middleware/glog" |
|
|
@ -17,7 +18,6 @@ import ( |
|
|
|
|
|
|
|
//基于windows系统服务器,安装成服务
|
|
|
|
|
|
|
|
|
|
|
|
type program struct{} |
|
|
|
|
|
|
|
func (p *program) Start(s service.Service) error { |
|
|
@ -103,7 +103,8 @@ func imain() { |
|
|
|
app.RegisterView(iris.HTML(savePath, ".html")) |
|
|
|
// 设置静态资源
|
|
|
|
app.StaticWeb("/public", savePath) |
|
|
|
|
|
|
|
//数据备份
|
|
|
|
go db.CornTime() |
|
|
|
//启动监听端口
|
|
|
|
app.Run(iris.Addr(":22000"), iris.WithConfiguration(parse.C)) |
|
|
|
//app.Run(iris.Addr(":8092"), iris.WithConfiguration(parse.C))
|
|
|
|