Skip to content

Commit

Permalink
Merge pull request #3 from hamadsuniverse/ci-test
Browse files Browse the repository at this point in the history
Add ci-test file, completed ci test (hopefully)
  • Loading branch information
hamadsuniverse authored Feb 28, 2024
2 parents 75fed9c + a56958b commit 571c114
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 8 deletions.
1 change: 1 addition & 0 deletions .github/ci-test.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
v1
3 changes: 3 additions & 0 deletions packages/functions/src/sample-python-lambda/lambda.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@

def main(event, context):
return "Hello from Lambda"
Empty file.
23 changes: 16 additions & 7 deletions stacks/ApiStack.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,27 @@ import { Duration } from "aws-cdk-lib/core";
export function ApiStack({ stack }: StackContext) {

const {table} = use(DBStack);

// Create the HTTP API
const api = new Api(stack, "Api", {
defaults: {
function: {
// Bind the table name to our API
bind: [table],
},
function: {
// Bind the table name to our API
bind: [table],
},
},
routes: {
"POST /": "packages/functions/src/lambda.main",
},
// Sample TypeScript lambda function
"POST /": "packages/functions/src/lambda.main",
// Sample Pyhton lambda function
"GET /": {
function: {
handler: "packages/functions/src/sample-python-lambda/lambda.main",
runtime: "python3.11",
timeout: "60 seconds",
}
},
}
});

// cache policy to use with cloudfront as reverse proxy to avoid cors
Expand Down
2 changes: 1 addition & 1 deletion stacks/FrontendStack.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ export function FrontendStack({ stack }: StackContext) {
},
}
});

// Show the URLs in the output
stack.addOutputs({
SiteUrl: site.url,
Expand Down

0 comments on commit 571c114

Please sign in to comment.