当前位置:网站首页>nest. Database for getting started with JS
nest. Database for getting started with JS
2022-07-07 18:16:00 【crayon-shin-chan】
file :https://docs.nestjs.com/techniques/database
1. brief introduction
Nest Database independent , Can easily work with any SQL or NoSQL Database integration .
You can directly use any general Node.js Data integration library or ORM, Such as
- MikroORM
- Sequelize
- Knex.js
- TypeORM
- Prisma
Nest Provided with TypeORM and Sequelize The tight integration of , Separate use
- @nestjs/typeorm
- @nestjs/sequelize
2.TypeORM
2.1 Installation dependency
To start using it , First install the required dependencies .
$ npm install --save @nestjs/typeorm typeorm mysql2
2.2 Using modules
After installation , hold TypeOrmModule Import to AppModule in .
@Module({
imports: [
TypeOrmModule.forRoot({
type: 'mysql',
host: 'localhost',
port: 3306,
边栏推荐
- cf:C. Factorials and Powers of Two【dp + 排序 + 选不选板子 + 选若干个数等于已知和的最少数】
- [tpm2.0 principle and Application guide] Chapter 5, 7 and 8
- 五种网络IO模型
- 2022年理财产品的一般收益率是多少?
- swiper左右切换滑块插件
- debian10系统问题总结
- Using stored procedures, timers, triggers to solve data analysis problems
- 漫画 | 宇宙第一 IDE 到底是谁?
- 磁盘存储链式的B树与B+树
- [principles and technologies of network attack and Defense] Chapter 3: network reconnaissance technology
猜你喜欢
自动化测试:Robot FrameWork框架大家都想知道的实用技巧
保证接口数据安全的10种方案
机器人工程终身学习和工作计划-2022-
zdog. JS rocket turn animation JS special effects
Pro2: modify the color of div block
Pro2:修改div块的颜色
简单几步教你如何看k线图图解
[paddleseg source code reading] add boundary IOU calculation in paddleseg validation (1) -- val.py file details tips
你真的理解粘包与半包吗?3分钟搞懂它
手机版像素小鸟游js戏代码
随机推荐
<代码随想录二刷>链表
[tpm2.0 principle and Application guide] Chapter 5, 7 and 8
Chapter 3 business function development (to remember account and password)
Yearning-SQL审核平台
Use onedns to perfectly solve the optimization problem of office network
Simple loading animation
讨论 | AR 应用落地前,要做好哪些准备?
Learn to make dynamic line chart in 3 minutes!
[trusted computing] Lesson 10: TPM password resource management (II)
Explain it in simple terms. CNN convolutional neural network
万字保姆级长文——Linkedin元数据管理平台Datahub离线安装指南
测试3个月,成功入职 “字节”,我的面试心得总结
磁盘存储链式的B树与B+树
三仙归洞js小游戏源码
不能忽略的现货白银短线操作小技巧
zdog. JS rocket turn animation JS special effects
SD_DATA_RECEIVE_SHIFT_REGISTER
[principle and technology of network attack and Defense] Chapter 7: password attack technology Chapter 8: network monitoring technology
How to open an account for wealth securities? Is it safe to open a stock account through the link
Based on pytorch, we use CNN to classify our own data sets