Skip to content

Commit

Permalink
feat: working version
Browse files Browse the repository at this point in the history
  • Loading branch information
capopovici committed Jul 8, 2021
1 parent 41ac52b commit 5c06151
Show file tree
Hide file tree
Showing 8 changed files with 758 additions and 4,874 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
node_modules
build
.build
coverage
.vscode
.DS_STORE
Expand Down
10 changes: 6 additions & 4 deletions lambda.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,17 @@ async function bootstrapServer() {
const ignitor = new Ignitor(__dirname)
const httpServer = ignitor.httpServer()

httpServer.application.setup()
httpServer.application.registerProviders()
await httpServer.application.setup()
await httpServer.application.registerProviders()
await httpServer.application.bootProviders()
httpServer.application.requirePreloads()
await httpServer.application.requirePreloads()


const serverCore = httpServer.application.container.use('Adonis/Core/Server')
serverCore.errorHandler(httpServer.application.exceptionHandlerNamespace ?? '')
serverCore.errorHandler('App/Exceptions/Handler')
serverCore.optimize()


const server = serverCore.handle.bind(serverCore)
return server
}
Expand Down
Loading

0 comments on commit 5c06151

Please sign in to comment.