15 lines
379 B
TypeScript
15 lines
379 B
TypeScript
import type envSchema from './schema/env';
|
|
import getConfig from 'next/config';
|
|
import type { z } from 'zod';
|
|
|
|
type Config = z.infer<typeof envSchema>;
|
|
|
|
type RunTimeConfig = {
|
|
publicRuntimeConfig: Config;
|
|
serverRuntimeConfig: Config;
|
|
};
|
|
|
|
const { publicRuntimeConfig, serverRuntimeConfig } = getConfig() as RunTimeConfig;
|
|
|
|
export { publicRuntimeConfig, serverRuntimeConfig };
|