mirror of
https://gitlab.com/PronounsPage/PronounsPage.git
synced 2025-08-03 11:07:00 -04:00

care must be taken because everything initialized later will not be picked up by Nitro useRuntimeConfig() without passing an event
13 lines
360 B
TypeScript
13 lines
360 B
TypeScript
import fs from 'node:fs/promises';
|
|
|
|
import { rootDir } from './paths.ts';
|
|
|
|
const publicKeyFile = `${rootDir}/keys/public.pem`;
|
|
try {
|
|
process.env.NUXT_PUBLIC_PUBLIC_KEY = await fs.readFile(publicKeyFile, 'utf-8');
|
|
} catch (error) {
|
|
console.error(error);
|
|
}
|
|
|
|
process.env.NUXT_PUBLIC_CLOUDFRONT = `https://${process.env.AWS_CLOUDFRONT_ID}.cloudfront.net`;
|