Skip to content

Commit

Permalink
refactor: create http server
Browse files Browse the repository at this point in the history
  • Loading branch information
dnalborczyk committed Oct 15, 2022
1 parent 51a30e9 commit 132dd7f
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion src/events/http/Http.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,16 @@ import HttpServer from './HttpServer.js'
export default class Http {
#httpServer = null

#lambda = null

#options = null

#serverless = null

constructor(serverless, options, lambda) {
this.#httpServer = new HttpServer(serverless, options, lambda)
this.#lambda = lambda
this.#options = options
this.#serverless = serverless
}

start() {
Expand All @@ -18,6 +26,12 @@ export default class Http {
}

async createServer() {
this.#httpServer = new HttpServer(
this.#serverless,
this.#options,
this.#lambda,
)

await this.#httpServer.createServer()
}

Expand Down

0 comments on commit 132dd7f

Please sign in to comment.