当前位置:网站首页>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,
边栏推荐
- 元宇宙带来的创意性改变
- [trusted computing] Lesson 13: TPM extended authorization and key management
- In depth understanding of USB communication protocol
- mui侧边导航锚点定位js特效
- Tips of the week 136: unordered containers
- 财富证券证券怎么开户?通过链接办理股票开户安全吗
- 现在网上期货开户安全吗?国内有多少家正规的期货公司?
- Download, installation and development environment construction of "harmonyos" deveco
- Learn to make dynamic line chart in 3 minutes!
- [deep learning] 3 minutes introduction
猜你喜欢
[deep learning] 3 minutes introduction
Win11C盘满了怎么清理?Win11清理C盘的方法
2021年全国平均工资出炉,你达标了吗?
Backup Alibaba cloud instance OSS browser
What skills can you master to be a "master tester" when doing software testing?
[principle and technology of network attack and Defense] Chapter 1: Introduction
你真的理解粘包与半包吗?3分钟搞懂它
[PaddleSeg源码阅读] PaddleSeg Validation 中添加 Boundary IoU的计算(1)——val.py文件细节提示
Mrs offline data analysis: process OBS data through Flink job
回归问题的评价指标和重要知识点总结
随机推荐
数学分析_笔记_第11章:Fourier级数
[4500 word summary] a complete set of skills that a software testing engineer needs to master
【demo】循环队列及条件锁实现goroutine间的通信
Five simple ways to troubleshoot with Stace
What are the financial products in 2022? What are suitable for beginners?
讨论 | AR 应用落地前,要做好哪些准备?
SD_DATA_RECEIVE_SHIFT_REGISTER
socket编程之常用api介绍与socket、select、poll、epoll高并发服务器模型代码实现
[deep learning] 3 minutes introduction
4种常见的缓存模式,你都知道吗?
More than 10000 units were offline within ten days of listing, and the strength of Auchan Z6 products was highly praised
Ten thousand words nanny level long article -- offline installation guide for datahub of LinkedIn metadata management platform
[principle and technology of network attack and Defense] Chapter 7: password attack technology Chapter 8: network monitoring technology
cf:C. Factorials and Powers of Two【dp + 排序 + 选不选板子 + 选若干个数等于已知和的最少数】
Tips of this week 135: test the contract instead of implementation
做软件测试 掌握哪些技术才能算作 “ 测试高手 ”?
通过 Play Integrity API 的 nonce 字段提高应用安全性
Is it safe to open an online futures account now? How many regular futures companies are there in China?
Slider plug-in for swiper left and right switching
Click on the top of today's headline app to navigate in the middle