import { cleanEnv, str, bool, port, url, host } from "envalid"; const env = cleanEnv(process.env, { BACKEND_PORT: port({ desc: "The port for the backend server", default: 3000, }), DATABASE_URL: url({ desc: "The URL for the database connection", }), // Redis configuration REDIS_HOST: host({ desc: "The host for the Redis server", default: "localhost", }), REDIS_PORT: port({ desc: "The port for the Redis server", default: 6379, }), REDIS_PASSWORD: str({ desc: "The password for the Redis server", }), // S3 configuration S3_ENDPOINT: host({ desc: "The endpoint for the S3 service", default: "localhost", }), S3_BUCKET: str({ desc: "The name of the S3 bucket", default: "my-bucket", }), S3_PORT: port({ desc: "The port for the S3 service", default: 9000, }), S3_USE_SSL: bool({ desc: "Use SSL for S3 service", default: false, }), S3_ACCESS_KEY: str({ desc: "Access key for the S3 service", }), S3_SECRET_KEY: str({ desc: "Secret key for the S3 service", }), // Log Level configuration LOG_LEVEL: str({ desc: "The log level for the application", choices: ["debug", "info", "warn", "error", "silent"], default: "info", }), }); export default env;