You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$ go run main.go
2022/03/31 13:07:13 error: Config File "config" Not Found in"[/Users/eryajf/code/github/go-web-mini.]"
panic: 读取配置文件失败:Config File "config" Not Found in"[/Users/eryajf/code/github/go-web-mini.]"
goroutine 1 [running]:
go-web-mini/config.InitConfig()
/Users/eryajf/code/github/go-web-mini/config/config.go:54 +0x29d
main.main()
/Users/eryajf/code/github/go-web-mini/main.go:21 +0x45
exit status 2
$ git clone https://github.com/gnimli/go-web-mini-ui.git
$ cd go-web-mini-ui
需要注意,前端的项目不能直接运行如下命令启动:
$ yarn
$ yarn dev
否则启动时总会报如下的错误:
$ yarn dev
yarn run v1.22.18
$ vue-cli-service serve
INFO Starting development server...
98% after emitting CopyPlugin
ERROR Failed to compile with 8 errors 上午10:55:21
These dependencies were not found:
* core-js/modules/es.error.cause.js in ./node_modules/@babel/runtime/helpers/nonIterableRest.js, ./node_modules/@babel/runtime/helpers/esm/createForOfIteratorHelper.js and 4 others
* core-js/modules/es.regexp.dot-all.js in ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/ThemePicker/index.vue?vue&type=script&lang=js&, ./src/utils/index.js
To install them, you can run: npm install --save core-js/modules/es.error.cause.js core-js/modules/es.regexp.dot-all.js
Activity
eryajf commentedon Mar 31, 2022
如果有新的同学,可以一起交流。
eryajf commentedon Mar 31, 2022
个人整理前后端开发调试流程:
后端
首先将项目克隆到本地,然后检测依赖:
$ git clone https://github.com/gnimli/go-web-mini.git $ cd go-web-mini $ go mod tidy然后根据实际情况,在
config.yaml中配置数据库连接信息,注意需要先创建数据库。然后要注意一个细节,读取配置文件的时候,需要稍微调整下:
否则运行时会报如下错误:
全部配置完毕之后,就可以直接运行启动了。
启动之后会自动将一些初始数据同步到数据库,因此,只要后端能正常启动,那么就没啥问题,可以投入使用了。
前端
一样,先将代码克隆到本地:
$ git clone https://github.com/gnimli/go-web-mini-ui.git $ cd go-web-mini-ui需要注意,前端的项目不能直接运行如下命令启动:
否则启动时总会报如下的错误:
查网上资料说,core-js模块儿版本的问题,此时可以先将
package.json中的版本调整如下,然后再次安装依赖。记得先清空
node_modules,然后再运行如下命令:这样项目就跑起来了,默认用户名密码为
admin:123456,可以直接访问看效果。eryajf commentedon Apr 1, 2022
本地请求调试的过程中,最好先通过web端,输入用户名密码进行登陆,然后会生成对应的cookie,即可调试。
注意请求时还要对应header配置,以及cookie两项配置方可通过工具请求接口调试。
header内容如下:
从这里获取:
cookie的配置如下:
从这里获取:
ericdai commentedon May 21, 2022
有QQ群最好 另外希望支持postgresql 这样就可以支持很多国产数据库
qishu321 commentedon Nov 18, 2022
有群了麻烦告知我下,项目确实很不错
shinhaoting commentedon May 8, 2025
基于这个项目,我把项目前端升级到vue3 typescript,项目地址在https://gitcode.com/xiayang/gin-mini-admin.git 欢迎大家一起完善这个项目