? Simple and easy to use, no hassle, straightforward go-web framework
xirang
, also known as Xirang, probably when I was in elementary school, my father came back from other places and brought back several books. One of them was "The Classic of Mountains and Seas" that Brother Xun loved to read when he was a child. It was also at that time that I read the book for the first time. Know this word once.Wikipedia's explanation is: Xi soil is a kind of divine object in ancient Chinese legends. The so-called "Xi soil" is soil that can grow on its own. For a dike built with "Xi soil", if the floodwater grows one meter long, the dike will also automatically grow one meter longer.
I named the project
xirang
because I hope that as I continue to learn and accumulate, the project will grow and become more powerful.
xirang
is a very simple gin+gorm
framework infrastructure. You only need to modify simple code to start writing your interface.
You only need to modify the configuration config.yml
according to the situation, and then configure the database configuration information inside to start development.
The data table will be created automatically, or you can create it yourself through sql under docs.
Classification | GitHub | Gitee |
---|---|---|
rear end | https://github.com/eryajf/xirang.git | https://gitee.com/eryajf-world/xirang.git |
front end | https://github.com/eryajf/xirang-ui.git | https://gitee.com/eryajf-world/xirang-ui.git |
xirang
├── config----------------配置文件读取
├── controller------------控制层
├── logic-----------------逻辑层
├── middleware------------中间件
├── model-----------------对象定义
├── public----------------一些公共组件与工具
├── routers---------------路由
├── service---------------服务层
├── test------------------一些测试
├── config.yml------------配置文件
└── main.go---------------程序入口
The basic dependency of the xirang project is only MySQL. After preparing these two services locally, you can start the project and debug it.
# 后端代码
$ git clone https://github.com/eryajf/xirang.git
# 前端代码
$ git clone https://github.com/eryajf/xirang-ui.git
# 修改后端配置
$ cd xirang
# 文件路径 config.yml, 根据自己本地的情况,调整数据库等配置信息。
$ vim config.yml
# 启动后端
$ cd xirang
$ go mod tidy
$ make run
# 启动前端
$ cd xirang-ui
$ git config --global url. " https:// " .insteadOf git://
$ npm install --registry=http://registry.npmmirror.com
$ yarn dev
Local access: http://localhost:8090, username/password: admin/123456