学习knex过程中好的参考资料整理

记录本人制作博客系统和学习knex找的相关资料链接:

1、博客系统
https://github.com/huoguozhang/my-blog/tree/master/models

2、与typescript结合,TypeScript + Express + Objection.js + Knex.js + MySQL
https://github.com/corocn/ts-server/tree/61c1e928517348f3df8c3bf8e10a6ddd0fca6cf5
包含内容:migrations

3、knex.js中文文档-查询
https://blog.songxingguo.com/2018/06/30/knex.js-query/

4、migration with knex
https://www.ctolib.com/topics-109587.html

5、Express + Knex + Objection = Painless API with DB
https://itnext.io/express-knex-objection-painless-api-with-db-74512c484f0c
Eager loading

User.query()
    .where('id', id)
    .eager('messages')
    .then(user => {
        res.json(user)
    })
    
User.query()
  .where('id', id)
  .eager('[pictures, messages.comments]')

6、knex的用户登录写法
https://github.com/Bijusrt/Blog-Project/blob/master/controler/login.js

knex.select().from('blog_login').then
...
jwt.sign(userName,'athuragasiyam')

7、nest + knex 项目
https://github.com/AlxPatidar/nest-knex

8、一个graphql-engine项目
https://github.com/hasura/graphql-engine/blob/a7eabe034ccf15798b85e35ee62f03bcce59e0b7/community/sample-apps/nextjs-8-serverless/with-apollo-jwt/hasura/migrations/1554285367178_nextjs-auth.up.sql

9、Making a RESTful API with Hapi.js

  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值