playlist-entry-validator/netlify/functions/validate-pr/index.ts

21 lines
450 B
TypeScript
Raw Normal View History

2023-07-06 14:02:28 +02:00
import { readdirSync } from 'fs';
console.log(readdirSync('/var/task'));
2023-07-06 13:59:43 +02:00
process.chdir('/var/runtime');
2023-07-06 13:55:18 +02:00
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 };