SPB Git forge

spb/websensor

Public
33commits 1branches 0releases
3.4 MBsize
maindefault branch
10 days agolast push
TypeScript 55.4% Python 43.2% SQL 1.2%
789 B · 19 lines typescript
Raw Blame History
1const env = process.env;23export const config = {4  env: env.NODE_ENV ?? "development",5  logLevel: env.LOG_LEVEL ?? "info",6  port: Number(env.API_PORT ?? 8260),7  host: env.API_HOST ?? "127.0.0.1",8  redisUrl: env.REDIS_URL ?? "redis://127.0.0.1:6379",9  webUrl: env.WEB_URL ?? "http://127.0.0.1:8261",10  publicBaseUrl: env.PUBLIC_BASE_URL ?? "http://localhost:8260",11  canonicalHost: env.CANONICAL_HOST ?? "www.websensor.io",12  redirectApexToWww: (env.WS_REDIRECT_APEX ?? "1") !== "0",13  /** Admin endpoints (`/api/v1/admin/*`) are enabled only when this token is set; sent as `X-WebSensor-Admin`. */14  adminToken: env.WS_ADMIN_TOKEN ?? "",15  /** Custom URL monitors per anonymous owner (spec §45). */16  monitorsPerOwner: Number(env.WS_MONITORS_PER_OWNER ?? 5),17  version: "0.3.0",18};19