console/packages/services/server/src/dev.ts

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');