Skip to content

Commit

Permalink
fix route integration?
Browse files Browse the repository at this point in the history
  • Loading branch information
devksingh4 committed Jan 28, 2025
1 parent 6e0afc8 commit 51bca50
Show file tree
Hide file tree
Showing 5 changed files with 99 additions and 201 deletions.
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ clean:
build: src/ cloudformation/ docs/
yarn -D
VITE_BUILD_HASH=$(GIT_HASH) yarn build
cp -r src/api/resources/ dist/api/resources
sam build --template-file cloudformation/main.yml

local:
Expand Down
4 changes: 2 additions & 2 deletions cloudformation/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -127,15 +127,15 @@ Resources:
BuildMethod: esbuild
BuildProperties:
Format: esm
Minify: true
Minify: !Equals [!Ref RunEnvironment, 'prod']
OutExtension:
- .js=.mjs
Loader:
- .png=file
- .pkpass=file
- .json=file
Target: "es2022"
Sourcemap: false
Sourcemap: !Not [!Equals [!Ref RunEnvironment, 'prod']]
EntryPoints:
- api/lambda.js
External:
Expand Down
2 changes: 2 additions & 0 deletions src/api/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import NodeCache from "node-cache";
import { DynamoDBClient } from "@aws-sdk/client-dynamodb";
import { SecretsManagerClient } from "@aws-sdk/client-secrets-manager";
import { SESClient } from "@aws-sdk/client-ses";
import mobileWalletRoute from "./routes/mobileWallet.js";

dotenv.config();

Expand Down Expand Up @@ -117,6 +118,7 @@ async function init() {
api.register(icalPlugin, { prefix: "/ical" });
api.register(iamRoutes, { prefix: "/iam" });
api.register(ticketsPlugin, { prefix: "/tickets" });
api.register(mobileWalletRoute, { prefix: "/mobileWallet" });
if (app.runEnvironment === "dev") {
api.register(vendingPlugin, { prefix: "/vending" });
}
Expand Down
3 changes: 2 additions & 1 deletion src/api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
"zod-validation-error": "^3.3.1"
},
"devDependencies": {
"@tsconfig/node22": "^22.0.0"
"@tsconfig/node22": "^22.0.0",
"nodemon": "^3.1.9"
}
}
Loading

0 comments on commit 51bca50

Please sign in to comment.