chore(@nestjs) publish v11.0.9 release Feb 10, 2025 sample Merge pull request#14603from nestjs/renovate/nest-monorepo Feb 11, 2025 scripts Merge branch '8.0.0' into fix-set-name-property-of-exception-object-e… Jan 27, 2021 tools ...
nestjs/mongoose master 8Branches40Tags Code Folders and files Name Last commit message Last commit date Latest commit renovate[bot] chore(deps): update dependency @types/node to v22.10.10 (#2372) Jan 24, 2025 7d2c555·Jan 24, 2025
第一次写node项目,之前除了前端的脚手架构建接触过一些简单的,所以总是碰到很多坑。比如权限验证,比如异常处理,比如日志管理。 在看log4js使用方法的时候突然想到自己就可以实现简单的业务,不需要借助组件,虽然简单但是实现了挺开心的。 为什么需要日志管理 自己的node项目写了一段时间了,但一直没有加上日志管理的功能...
Not, Between, Equal, Like, In } from 'typeorm'; import * as dayjs from 'dayjs'; import { CreatePostDto } from './dto/create-post.dto'; import { UpdatePostDto } from './dto/update-post.dto'; import { PostsEntity }
Today I am excited to announce the official release ofNestJS 7. This is a major release spanning the entire platform, including the framework, numerous changes to the@nestjs/graphqlpackage, CLI improvements, and updated documentation. In case you're not familiar withNestJS, it is a TypeScrip...
import { Module } from '@nestjs/common'; import { TypeOrmModule } from '@nestjs/typeorm'; @Module({ imports: [ TypeOrmModule.forRoot({ type: 'mysql', host: 'localhost', port: 3306, username: 'root', password: 'root', database: 'test', entities: [], synchronize: true, }), ]...
在上一篇文章中,我们介绍了 NestJS 的基础概念和核心功能。本文将深入探讨如何在 NestJS 中集成 TypeORM,实现数据库操作的最佳实践。 TypeORM 集成配置 1. 安装依赖 首先安装必要的依赖包: npminstall@nestjs/typeorm typeorm pg# 如果使用 MySQL# npm install @nestjs/typeorm typeorm mysql2 ...
在上一篇文章中,我们介绍了 NestJS 的基础概念和核心功能。本文将深入探讨如何在 NestJS 中集成 TypeORM,实现数据库操作的最佳实践。 TypeORM 集成配置 1. 安装依赖 首先安装必要的依赖包: npm install @nestjs/typeorm typeorm pg # 如果使用 MySQL
app.module.ts JS import { Module } from '@nestjs/common'; import { TypeOrmModule } from '@nestjs/typeorm'; import { User } from './users/user.entity'; @Module({ imports: [ TypeOrmModule.forRoot({ type: 'mysql', host: 'localhost', port: 3306, username: 'root', password: 'roo...
${Date.now() - now}ms`)), ); }}@@switchimport { Injectable } from '@nestjs/common';import { Observable } from 'rxjs';import { tap } from 'rxjs/operators';@Injectable()export class LoggingInterceptor { intercept(context, next) { console.log('Before...'); const now = Date.now(...