Skip to content

Commit

Permalink
fix: updated packages
Browse files Browse the repository at this point in the history
  • Loading branch information
khanzzirfan committed Nov 22, 2023
1 parent 1677aa5 commit ad195f6
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 10 deletions.
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,10 @@
"@vendia/serverless-express": "^4.8.2",
"@azure/functions": "^4.0.0-alpha.11",
"@azure/logger": "^1.0.4",
"@ffmpeg-installer/ffmpeg": "^1.1.0",
"@ffprobe-installer/ffprobe": "^2.1.2",
"@ffmpeg-installer/linux-x64": "^4.1.0",
"fluent-ffmpeg": "^2.1.2",
"axios": "^0.19.2",
"body-parser": "^1.17.1",
"class-validator": "^0.14.0",
Expand All @@ -53,8 +57,6 @@
"rxjs": "^7.8.0"
},
"devDependencies": {
"@ffmpeg-installer/ffmpeg": "^1.1.0",
"@ffprobe-installer/ffprobe": "^2.1.2",
"@nestjs/cli": "^9.1.7",
"@nestjs/schematics": "^9.0.4",
"@types/express": "^4.17.8",
Expand All @@ -63,11 +65,9 @@
"@types/supertest": "^2.0.10",
"@typescript-eslint/eslint-plugin": "^4.15.0",
"@typescript-eslint/parser": "^4.15.0",
"aws-lambda": "latest",
"eslint": "^7.20.0",
"eslint-config-prettier": "7.2.0",
"eslint-plugin-prettier": "^3.1.4",
"fluent-ffmpeg": "^2.1.2",
"prettier": "^2.1.2",
"serverless": "^3.37.0",
"serverless-azure-functions": "^2.0.0",
Expand Down
5 changes: 2 additions & 3 deletions src/azurefunctionapp.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
import { NestFactory } from '@nestjs/core';
import { ExpressAdapter } from '@nestjs/platform-express';
import serverlessExpress from '@vendia/serverless-express';
import { Context, Handler } from 'aws-lambda';
import { SwaggerModule, DocumentBuilder } from '@nestjs/swagger';
import express from 'express';
import { AppModule } from './app.module';

let cachedServer: Handler;
let cachedServer: any;

/** Enable swagger */
function setupSwaggerDocument(app) {
Expand Down Expand Up @@ -38,7 +37,7 @@ async function bootstrap() {

export const handler = async (
event: any,
context: Context,
context: any,
callback: any,
): Promise<any> => {
const server = await bootstrap();
Expand Down
5 changes: 2 additions & 3 deletions src/lambda.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
import { NestFactory } from '@nestjs/core';
import { ExpressAdapter } from '@nestjs/platform-express';
import serverlessExpress from '@vendia/serverless-express';
import { Context, Handler } from 'aws-lambda';
import express from 'express';

import { AppModule } from './app.module';

let cachedServer: Handler;
let cachedServer: any;

async function bootstrap() {
if (!cachedServer) {
Expand All @@ -26,7 +25,7 @@ async function bootstrap() {
return cachedServer;
}

export const handler = async (event: any, context: Context, callback: any) => {
export const handler = async (event: any, context: any, callback: any) => {
const server = await bootstrap();
return server(event, context, callback);
};

0 comments on commit ad195f6

Please sign in to comment.