https://github.com/raoul1996/robot
悲从心中起,锅从天上来
https://github.com/raoul1996/robot
bithound egg eggjs maintenance mysql nodejs react react-ssr restful-api travis yml
Last synced: 13 days ago
JSON representation
悲从心中起,锅从天上来
- Host: GitHub
- URL: https://github.com/raoul1996/robot
- Owner: Raoul1996
- License: mit
- Created: 2017-12-29T16:15:22.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2024-09-11T02:19:41.000Z (over 1 year ago)
- Last Synced: 2024-09-11T07:33:14.512Z (over 1 year ago)
- Topics: bithound, egg, eggjs, maintenance, mysql, nodejs, react, react-ssr, restful-api, travis, yml
- Language: JavaScript
- Homepage: https://robot.raoul1996.cn
- Size: 1.42 MB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 36
-
Metadata Files:
- Readme: README.md
- Changelog: History.md
- License: LICENSE
Awesome Lists containing this project
README
# egg-react-robot
[](https://travis-ci.org/Raoul1996/robot)
[](https://www.bithound.io/github/Raoul1996/robot)
[](https://www.bithound.io/github/Raoul1996/robot/master/dependencies/npm)
[](https://www.bithound.io/github/Raoul1996/robot/master/dependencies/npm)
[](https://www.bithound.io/github/Raoul1996/robot)
[](https://codeclimate.com/github/Raoul1996/robot/maintainability)
> 悲从心头起,锅从天上来。体验一波 SSR
脚手架文档[在这里](OLDREADME.md)
## 技术栈
- Egg 版本: ^2.x.x
- Node 版本: Node ^8.x.x+,
- Webpack 版本: ^3.5.5, 对应 `easywebpack-react` 版本为 3.0.0
- React 版本: ^15.0.0, ^16.0.0,
## 踩坑日志
#### 20171230 配置 travis-ci、项目初次尝试
- egg 在编译的时候需要 `.eslintrc` 配置文件,所以部署到服务器的时候需要将项目中的隐藏文件一起打包,解决方法见 [.travis.yml](.travis.yml) 中这个部分:
```
# 压缩,为上传准备
# 因为 egg 进行编译的时候会需要 ESLint 的配置文件,所以隐藏文件需要打包
- tar -jcf robot.tar.bz2 * .*
```
- 在创建新的 router 之后,需要重启服务
- [关闭安全威胁csrf防范?](https://github.com/eggjs/egg/issues/509),这个设置极其不安全,所以打了 TODO
- 配置数据库是在 config 下面的 plugin 中开启,在 config/config.${env}.js 配置各个环境的数据库连接信息
#### 20180117 Recharts 配置与按需引用,并绘制散点图
- Recharts 中的 dataKey 对应的值需要时数字,使用字符串不能绘制出图像,所以修改数据库records 表中的 varchar -> bigint
## 开发日志
#### 20171230
- 配置 travis-ci
- 熟悉框架
- 设计数据表
- 设计接口
#### 20180117
- 服务端渲染模板配置
- 引入 Recharts
- 按需引用