initial wcag-ada
This commit is contained in:
parent
042b8cb83a
commit
d52cfe7de2
112 changed files with 9069 additions and 0 deletions
38
apps/wcag-ada/worker/src/config/index.ts
Normal file
38
apps/wcag-ada/worker/src/config/index.ts
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
import { config as dotenvConfig } from "dotenv";
|
||||
import { resolve } from "path";
|
||||
|
||||
// Load environment variables
|
||||
dotenvConfig({ path: resolve(process.cwd(), ".env") });
|
||||
|
||||
export const config = {
|
||||
// Redis configuration
|
||||
redis: {
|
||||
host: process.env.REDIS_HOST || "localhost",
|
||||
port: parseInt(process.env.REDIS_PORT || "6379", 10),
|
||||
password: process.env.REDIS_PASSWORD,
|
||||
db: parseInt(process.env.REDIS_DB || "0", 10),
|
||||
},
|
||||
|
||||
// Worker configuration
|
||||
worker: {
|
||||
concurrency: parseInt(process.env.WORKER_CONCURRENCY || "5", 10),
|
||||
maxJobsPerWorker: parseInt(process.env.MAX_JOBS_PER_WORKER || "100", 10),
|
||||
},
|
||||
|
||||
// Service configuration
|
||||
serviceName: "wcag-ada-worker",
|
||||
|
||||
// Scanner configuration
|
||||
scanner: {
|
||||
timeout: parseInt(process.env.SCANNER_TIMEOUT || "300000", 10), // 5 minutes
|
||||
maxRetries: parseInt(process.env.SCANNER_MAX_RETRIES || "3", 10),
|
||||
},
|
||||
|
||||
// Database URL (for Prisma)
|
||||
databaseUrl: process.env.DATABASE_URL,
|
||||
|
||||
// Environment
|
||||
env: process.env.NODE_ENV || "development",
|
||||
isDevelopment: process.env.NODE_ENV \!== "production",
|
||||
isProduction: process.env.NODE_ENV === "production",
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue