Skip to content

Commit

Permalink
💚 fixci: fix lambda
Browse files Browse the repository at this point in the history
  • Loading branch information
victorsoares96 committed May 31, 2024
1 parent 2729b17 commit a9d0aff
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion sam-template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Resources:
Properties:
Environment:
Variables:
NODE_ENV: production
NODE_ENV: staging
CodeUri: ./dist
PackageType: Zip
Runtime: nodejs20.x
Expand Down
8 changes: 4 additions & 4 deletions src/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,10 @@ class Server {
this.express.use(express.urlencoded({ limit: '5mb', extended: true }));

if (!isLambda()) this.getProjectVersion();

this.routeLevelMiddlewares();
this.routes();
this.errorHandlerMiddlewares();
}

private getProjectVersion(): void {
Expand Down Expand Up @@ -121,10 +125,6 @@ class Server {

this.server = await this.createServer();

this.routeLevelMiddlewares();
this.routes();
this.errorHandlerMiddlewares();

if (port) this.PORT = port;
this.server.listen(port);

Expand Down

0 comments on commit a9d0aff

Please sign in to comment.