-
Node.js HMAC-SHA256 签名认证
需求 对于WebHook,对外提供的API,均需要验证请求方的真实性。 方法 IP白名单 签名认证 HMAC-SHA256 MD5(简易版) HMAC-SHA256 64位长度的字符串(只有
-
NestJS 使用 SWC 加速开发环境编译构建
SWC SWC (Speedy Web Compiler) is an extensible Rust-based platform that can be used for both compi
-
NestJS CRUD generator 快速创建模板代码
作用 自动创建Entity、DTO、Service、Controller(包含CRUD接口) 命令 nest g resource [name] 输出 $ nest g resource user
-
NestJS 安装与初始化项目
安装命令行 -g:全局安装 npm i -g @nestjs/cli 初始化项目 nest new project-name 输出 $ nest new nestjs-demo ✨ We wi
-
Node.js npm 与 pnpm 处理依赖的区别
npm 每个工程一个node_modules。 pnpm 每个工程中的node_modules只是硬链接,都会指向统一的位置。 查看pnpm存储的依赖包的位置。 pnpm store path 输
-
Node.js pnpm 包管理器版本升级
升级 pnpm 提示更新 ╭──────────────────────────────────────────╮ │
-
Vite .env 配置多行文字
多行文本 使用""双引号将多行文本包裹。 VITE_APP_NAME=应用名称 VITE_APP_DESC=" 这是${VITE_APP_NAME}的描述信息, 更多信息请查看具体网站 " 反斜杠
2026-04-19, Views: 357 , Topics: Vite Node.js JavaScript
-
Vite .env 变量插值
${} 在.env文件中也可以像模板字符串一样使用变量插值。 示例 VITE_APP_NAME=应用名称 VITE_APP_DESC=这是${VITE_APP_NAME}的描述信息 多行文本 多行
2026-04-18, Views: 301 , Topics: Vite Node.js JavaScript
-
Node.js Drizzle PostgreSQL 数组类型
array() text().array()表示text[]。 import {integer, pgTable, text} from "drizzle-orm/pg-core"; const
-
Node.js Drizzle PostgreSQL timestamptz 带时区的时间戳类型
timestamp() timestamp({withTimezone: true}),传入withTimezone属性为true。 import {integer, pgTable, timest
-
Node.js Drizzle PostgreSQL bigserial 类型
bigserial() bigserial("record_page_view_id_seq", {mode: "bigint"}),第一个参数指定序列的名称,第二个参数传入mode属性,指定big
-
Node.js Drizzle PostgreSQL bigint 类型
bigint() bigint({mode: "bigint"}),传入mode属性,指定bigint或number import { bigint, pgTable, timestamp } fr
-
Node.js Drizzle orderBy 升序、降序、联合排序
orderBy() 使用typeof、$inferSelect提取表结构的类型。 升序 orderBy(columnName)等价于orderBy(asc(columnName)) const po
-
Node.js Drizzle 查询表结构返回的类型
$inferSelect 使用typeof、$inferSelect提取表结构的类型。 const posts = pgTable("post", { id: integer().prima
-
Vite 中编辑 vite.conf.ts process 报错
process 报错 原因:没有安装@types/node类型提示。 npm install @types/node -D 参考文档 https://vite.dev/config/
-
Node.js 模块
模块分类 内置模块 fs path http 自定义模块 创建的每个js都是自定义模块。 第三方模块 非官方提供的模块,由第三方提供并维护,需下载使用. 又
2022-12-20, Views: 2134 , Topics: Node.js
-
package.json 中的依赖包版本号
major.minor.patch major:主版本 minor:次版本 patch:补丁版本 特殊符号 ~^>=<+* ~version 主版本
2022-12-17, Views: 2355 , Topics: JavaScript Node.js
-
配置 Angular 10 运行环境
前置条件 Python2.7 Visual Studio Community 2017 设置node-gyp:npm config set msvs_vers
-
PowerShell 无法执行 node-gyp 命令
错误信息 node-gyp : 无法加载文件 C:\Users\fendoudebb\AppData\Roaming\npm\node-gyp.ps1,因为在此
2021-06-19, Views: 5710 , Topics: Node.js PowerShell