1 Star 0 Fork 0

kanin / go_test

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
main.go 435 Bytes
一键复制 编辑 原始数据 按行查看 历史
kanin 提交于 2021-02-19 18:31 . 配置和环境变量
package main
import (
"blog/app/middlewares"
"blog/bootstrap"
"blog/config"
c "blog/pkg/config"
"net/http"
"github.com/gorilla/mux"
)
var router *mux.Router
func init() {
// 初始化配置信息
config.Initialize()
}
func main() {
//初始化数据库
bootstrap.SetupDB()
// 路由初始化
router = bootstrap.SetupRoute()
http.ListenAndServe(":"+c.GetString("app.port"), middlewares.RemoveTrailingSlash(router))
}
Go
1
https://gitee.com/kanin99/go_test.git
git@gitee.com:kanin99/go_test.git
kanin99
go_test
go_test
master

搜索帮助