当前位置:网站首页>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,
边栏推荐
- 万字保姆级长文——Linkedin元数据管理平台Datahub离线安装指南
- 回归测试的分类
- Chapter 3 business function development (to remember account and password)
- Deep learning machine learning various data sets summary address
- How to implement safety practice in software development stage
- Chapter 1 Introduction to CRM core business
- 物联网OTA技术介绍
- 做软件测试 掌握哪些技术才能算作 “ 测试高手 ”?
- [tpm2.0 principle and Application guide] Chapter 1-3
- [network attack and defense principle and technology] Chapter 4: network scanning technology
猜你喜欢
js拉下帷幕js特效显示层
Understanding of 12 methods of enterprise management
数学分析_笔记_第11章:Fourier级数
debian10编译安装mysql
Yearning-SQL审核平台
JS pull down the curtain JS special effect display layer
[answer] if the app is in the foreground, the activity will not be recycled?
Performance test process and plan
讨论 | AR 应用落地前,要做好哪些准备?
带动画的列表选中js特效
随机推荐
用存储过程、定时器、触发器来解决数据分析问题
使用OneDNS完美解决办公网络优化问题
Summary of debian10 system problems
MySQL index hit level analysis
Hash, bitmap and bloom filter for mass data De duplication
手撕Nacos源码(先撕客户端源码)
[OKR target management] case analysis
Sanxian Guidong JS game source code
What are the financial products in 2022? What are suitable for beginners?
<代码随想录二刷>链表
[trusted computing] Lesson 12: TPM authorization and conversation
Live broadcast software construction, canvas Text Bold
基于百度飞浆平台(EasyDL)设计的人脸识别考勤系统
Tips of this week 135: test the contract instead of implementation
简单几步教你如何看k线图图解
2022年理财有哪些产品?哪些适合新手?
How to clean when win11 C disk is full? Win11 method of cleaning C disk
直播软件搭建,canvas文字加粗
Self made dataset in pytoch for dataset rewriting
Ten thousand words nanny level long article -- offline installation guide for datahub of LinkedIn metadata management platform