playlist-entry-validator/netlify/functions/validate-pr/index.ts
2023-07-06 14:07:28 +02:00

21 lines
473 B
TypeScript

import { readdirSync } from 'fs';
console.log('/var/runtime:\n' + readdirSync('/var/runtime'));
process.chdir('/var/runtime');
import {
createProbot,
createLambdaFunction
} from '@probot/adapter-aws-lambda-serverless';
import { appFn } from '../../../appFn';
const privateKey = (process.env.PRIVATE_KEY as string).replace(/\\n/gm, '\n');
const handler = createLambdaFunction(appFn, {
probot: createProbot({ overrides: { privateKey } })
});
export { handler };