blob: 5106c6c6b1bb8ab3811050edf8f6538b1be3fd35 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
import process from 'node:process';
import { z } from 'zod';
const schema = z.object({});
export function env() {
const result = schema.safeParse(process.env);
if (!result.success) {
throw new Error(`Missing environment variables: ${result.error.issues
.map(issue => issue.path.join('.')).join(', ')}`);
}
return result.data;
}
|