ccrsystem's People
ccrsystem's Issues
前端编译失败
问题描述
前端运行npm run build
成功,npm run dev
项目可以正常访问;但是npm run build
之后的dist
文件夹不包括外部引用图片,使用服务器加载文件,css样式失效。
具体情况可访问https://kangblog.top查看。
更新后端代码架构
后端代码架构较混乱
目前后端需要处理跨域,session验证,路由转发,处理前端业务。使用既有的mux
中间件较为复杂,拟定更改代码架构。采用mux官方网站推荐的中间件形式,对跨域、session进行统一验证。
参考网站
增加日志文件
将错误输出到文件。注意加锁,防止多线程同时操作文件。
修改后端错误处理
- 完善错误处理,适当使用panic
- 增加数据库插入数据对于重复主键的处理
增加404自定义页
后端保留功能,根据前段情况开放。
修改后端文件结构
暂定修改为:
├── ccrsystem # x项目主目录
├── controllers # 定义业务功能
├── models # 定义数据模型
├── routers # 路由功能(原项目的server.go)
├── middlewares # 中间件
├── session # session数据文件夹
├── front-end # 前端文件夹
├── static # 静态文件(js, img, css)
├── views # 模板(html文件)
├── testconfig # 测试配置文件及说明文件
└── main.go # go main文件
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.