MCPcopy Create free account
hub / github.com/boringstack-xyz/boringstack / readUrls

Function readUrls

apps/api/src/config/env/validate.ts:188–198  ·  view source on GitHub ↗
(source: EnvSource)

Source from the content-addressed store, hash-verified

186});
187
188const readUrls = (source: EnvSource) => ({
189 FRONTEND_URL: nonEmpty(
190 source.FRONTEND_URL,
191 source.NODE_ENV === "test" ? "http://localhost:5173" : ""
192 ),
193 ALLOWED_ORIGINS: toCsv(source.ALLOWED_ORIGINS),
194 PUBLIC_API_URL:
195 source.PUBLIC_API_URL ??
196 `http://localhost:${String(toInt(source.PORT, 7330, "PORT"))}`,
197 NOTIFICATION_SETTINGS_URL: source.NOTIFICATION_SETTINGS_URL ?? "",
198});
199
200const readRateLimit = (source: EnvSource) => ({
201 RATE_LIMIT_MAX: toInt(source.RATE_LIMIT_MAX, 100, "RATE_LIMIT_MAX"),

Callers 1

readRawFunction · 0.85

Calls 3

nonEmptyFunction · 0.85
toCsvFunction · 0.85
toIntFunction · 0.85

Tested by

no test coverage detected