mirror of
https://github.com/graphql-hive/console
synced 2026-05-24 09:38:26 +00:00
16 lines
417 B
TypeScript
16 lines
417 B
TypeScript
import { existsSync, readFileSync } from 'fs';
|
|
import { join } from 'path';
|
|
import { config } from 'dotenv';
|
|
|
|
config({
|
|
debug: true,
|
|
encoding: 'utf8',
|
|
});
|
|
|
|
const privateKeyFile = join(process.cwd(), 'github-app.pem');
|
|
if (existsSync(privateKeyFile)) {
|
|
// eslint-disable-next-line no-process-env
|
|
process.env.INTEGRATION_GITHUB_APP_PRIVATE_KEY = readFileSync(privateKeyFile, 'utf8');
|
|
}
|
|
|
|
await import('./index');
|