server

时间:2021-03-29 00:03:27
【文件属性】:
文件名称:server
文件大小:19KB
文件格式:ZIP
更新时间:2021-03-29 00:03:27
Go 开发环境设置 本节假定终端的当前工作目录为项目目录。 所需工具: Python 安装 安装pre-commit pip install pre-commit && pre-commit install 安装 安装 提示:为GoLand / VSCode安装Go Linter插件 运行项目 要启动数据库: docker-compose up -d 要停止数据库: docker-compose down 要运行服务器: go run . 贡献准则 修改数据库的架构 要修改数据库的架构,您应该在创建一个迁移。 不要删除或修改现有的迁移migrations.go ,只有越来越ID添加更多的迁移到它。 创建路线 不要使用“纯” gin路由处理程序(带有签名func(*gin.Context)创建gin路由,而是使用createRouteHandler方法,该方法将为您的处理程序提供
【文件预览】:
server-master
----.gitignore(4B)
----go.mod(1KB)
----db.dockerfile(63B)
----dtos()
--------userDtos.go(231B)
----.pre-commit-config.yaml(112B)
----models()
--------user.go(1KB)
----go.sum(25KB)
----docker-compose.yml(340B)
----main.go(2KB)
----README.md(2KB)
----.idea()
--------.gitignore(205B)
--------misc.xml(172B)
--------sqldialects.xml(174B)
--------vcs.xml(167B)
--------watcherTasks.xml(1KB)
--------modules.xml(264B)
--------server.iml(458B)
----migrations()
--------migrations.go(558B)
----.golangci.yml(84B)

网友评论