-
-
Save tsh-code/51f362480d273a9618ae3e9705250941 to your computer and use it in GitHub Desktop.
API service
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as awilix from "awilix"; | |
import * as dotenv from "dotenv"; | |
import * as serverless from "serverless-http"; | |
import DynamoDbStorage from "../shared/storage/dynamoDb"; | |
import createContainer from "./container"; | |
import Server from "./server/server"; | |
dotenv.config(); | |
const container = createContainer({ | |
storage: awilix.asClass(DynamoDbStorage) | |
}); | |
const server = container.resolve<Server>("server").getApp(); | |
export const handler = serverless(server); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment