liujiandao
2023-11-02 963792355013e9e89904a67352312ab3d9acf7f6
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
package core
 
import (
    "fmt"
    "time"
 
    "go.uber.org/zap"
    "srm/global"
    "srm/initialize"
)
 
type server interface {
    ListenAndServe() error
}
 
func RunWindowsServer() {
    Router := initialize.Routers()
    Router.Static("/form-generator", "./resource/page")
 
    address := fmt.Sprintf(":%d", global.GVA_CONFIG.System.Addr)
    s := initServer(address, Router)
    // 保证文本顺序输出
    // In order to ensure that the text order output can be deleted
    time.Sleep(10 * time.Microsecond)
    global.GVA_LOG.Info("server run success on ", zap.String("address", address))
 
    global.GVA_LOG.Error(s.ListenAndServe().Error())
}