feat(web): 搭建应用骨架并完善开发环境配置

This commit is contained in:
2026-09-02 22:42:21 +08:00
parent 09e5207c83
commit 403f6cfa27
43 changed files with 2056 additions and 2356 deletions
+2 -1
View File
@@ -10,7 +10,8 @@
},
"dependencies": {
"@atlas/contracts": "workspace:*",
"bullmq": "6.3.4"
"bullmq": "6.3.4",
"ioredis": "6.0.0"
},
"devDependencies": {
"@types/node": "26.3.0",
+6 -1
View File
@@ -1,6 +1,11 @@
import { Queue } from 'bullmq';
import IORedis from 'ioredis';
const connection = { url: process.env.REDIS_URL ?? 'redis://localhost:6379' };
// 显式构造客户端实例传给 BullMQ:原生 ESM(pnpm start)下 BullMQ 无法按 connection
// 选项自动加载 ioredis;maxRetriesPerRequest: null 是 BullMQ Worker 的要求
const connection = new IORedis(process.env.REDIS_URL ?? 'redis://localhost:6379', {
maxRetriesPerRequest: null,
});
const dispatchQueue = new Queue('atlas-dispatch', { connection });
async function bootstrap() {