Created
September 27, 2019 11:15
-
-
Save barograf/0421760e7b3a5fa7dc21cff5936eef3f 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