希望官方能提供一个基于MySQL数据库CRUD的标准example
我们大多数业务都是基于数据库操作,希望官方能提供一个基于数据库的标准CRUD操作例子,大家通过标准example比较容易上手,感谢;
好,今天在去南京的路上写一下。
egg-mysql可用,有测试覆盖
@jtyjty99999 嗯,说的就是将 README 完善了。
恩,插件把 readme 完善详细,有些还是挺简单的。
@jtyjty99999 @fengmk2 @popomore egg-mysql中只是test和fixtures,希望能有一个完整可以跑通的MVC标准例子,能体现层次结构、各层次调用关系、以及模板渲染,我们如果马上用这个开启一个新项目,在此基础上修改更快更容易上手。 辛苦了 谢谢 :)
@atian25 他说的应该是我们昨晚说的那个framework的simple
@jtyjty99999 framework 和 simple 这两个 boilerplate 不希望有太多内容, 这是一个骨架来着.
他的需求我们可以几种方案实现:
- 直接 egg/example/mysql , 但是这样 egg 主库多了很多 devDeps
- 做一个 boilerplate, 但不建议放到 egg-boilerplate-framework , 做个 egg-boilerplate-common ?
- egg-init 支持选项, simple 的时候提供常用插件选择来生成
@atian25 我觉得可以作为“快速开发一个应用框架”的实例,讲如何init一个框架模板,之后即成几个插件
@zhoudaqing mysql 插件的使用文档完善了 https://github.com/eggjs/egg-mysql#egg-mysql
@fengmk2 看到了,原来这个是基于ali-rds插件的;通过egg-init初始化创建项目能顺利运行起来,为何egg-boilerplate-simple、egg-boilerplate-framework在windows环境均无法启动呢?
。。。 报错单独提个新 ISSUE 上来,我看看。
@atian25
F:\bf\egg-boilerplate-simple>npm run dev npm ERR! Windows_NT 6.1.7601 npm ERR! argv "D:\Program Files\nodejs\node.exe" "C:\Users\LangShu\AppData \Roaming\npm\node_modules\npm\bin\npm-cli.js" "run" "dev" npm ERR! node v4.5.0 npm ERR! npm v3.10.6
npm ERR! missing script: dev npm ERR! npm ERR! If you need help, you may report this error at: npm ERR! https://github.com/npm/npm/issues
npm ERR! Please include the following file with any support request: npm ERR! F:\bf\egg-boilerplate-simple\npm-debug.log
这是个模板啊,本来就不是让你直接运行的。。egg-init会拉取这个进行渲染
晚点加个说明吧。。。
这个 issue 可以 close 了吧
@fengmk2 @atian25 @jtyjty99999 @popomore 谢谢各位
https://github.com/eggjs/egg-boilerplate-simple/pull/10
加了
同感觉得官方egg-mysql的例子太少了,mysql的查询方式多了个去!
@zhoudaqing mysql 插件的使用文档完善了 https://github.com/eggjs/egg-mysql#egg-mysql
太简单了 比方 where 里面不等于怎么写呢