update: The code structure is finished, and the project can run successfully
This commit is contained in:
@@ -10,7 +10,7 @@ import (
|
||||
func init() {
|
||||
v := viper.New()
|
||||
v.SetConfigName("config") // 设置配置文件名 (不带后缀)
|
||||
v.AddConfigPath("/") // 第一个搜索路径
|
||||
v.AddConfigPath("./") // 第一个搜索路径
|
||||
v.SetConfigType("json")
|
||||
err := v.ReadInConfig() // 搜索路径,并读取配置数据
|
||||
if err != nil {
|
||||
|
@@ -3,7 +3,7 @@ package core
|
||||
import (
|
||||
"fmt"
|
||||
"gin-vue-admin/global"
|
||||
"gin-vue-admin/init"
|
||||
"gin-vue-admin/initialize"
|
||||
"net/http"
|
||||
"time"
|
||||
)
|
||||
@@ -11,9 +11,9 @@ import (
|
||||
func RunWindowsServer() {
|
||||
if global.GVA_CONFIG.System.UseMultipoint {
|
||||
// 初始化redis服务
|
||||
init.Redis()
|
||||
initialize.Redis()
|
||||
}
|
||||
Router := init.Routers()
|
||||
Router := initialize.Routers()
|
||||
Router.Static("/form-generator", "./resource/page")
|
||||
address := fmt.Sprintf(":%d", global.GVA_CONFIG.System.Addr)
|
||||
s := &http.Server{
|
||||
|
Reference in New Issue
Block a user