Skip to content

init #1

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
node_modules
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2023 open-abap
Copyright (c) 2023 Lars Hvam Petersen

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
# lambda-icf-shim
AWS lambda ICF shim

https://docs.aws.amazon.com/lambda/latest/dg/lambda-nodejs.html
https://github.com/aws/aws-lambda-runtime-interface-emulator/
67 changes: 67 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 16 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"name": "lambda-icf-shim",
"private": true,
"version": "1.0.0",
"description": "AWS lambda ICF shim",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "Lars Hvam Petersen",
"license": "MIT",
"dependencies": {
"@abaplint/cli": "^2.102.42",
"@abaplint/runtime": "^2.7.97",
"@abaplint/transpiler-cli": "^2.7.97"
}
}
9 changes: 9 additions & 0 deletions src/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
exports.handler = async (event) => {
let body = JSON.parse(event.body)
const product = body.num1 * body.num2;
const response = {
statusCode: 200,
body: "The product of " + body.num1 + " and " + body.num2 + " is " + product,
};
return response;
};