Scratch space for learning atproto app development
1import dotenv from 'dotenv'
2import { cleanEnv, host, num, port, str, testOnly } from 'envalid'
3
4dotenv.config()
5
6export const env = cleanEnv(process.env, {
7 NODE_ENV: str({ devDefault: testOnly('test'), choices: ['development', 'production', 'test'] }),
8 HOST: host({ devDefault: testOnly('localhost') }),
9 PORT: port({ devDefault: testOnly(3000) }),
10 PUBLIC_URL: str({}),
11 COOKIE_SECRET: str({ devDefault: '00000000000000000000000000000000' }),
12 CORS_ORIGIN: str({ devDefault: testOnly('http://localhost:3000') }),
13 COMMON_RATE_LIMIT_MAX_REQUESTS: num({ devDefault: testOnly(1000) }),
14 COMMON_RATE_LIMIT_WINDOW_MS: num({ devDefault: testOnly(1000) }),
15})