Skip to content

Commit

Permalink
feat: lambda-apiを最低限で導入
Browse files Browse the repository at this point in the history
  • Loading branch information
ljourm committed Mar 14, 2023
1 parent e31efcc commit 210fd69
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions handler.js
@@ -1,7 +1,9 @@
const api = require("lambda-api")();

api.get("/status", async (req, res) => {
return { status: "ok" };
});

exports.router = async (event, context, callback) => {
return {
statusCode: 200,
headers: {},
body: JSON.stringify({ message: "hello world" }),
};
return await api.run(event, context);
};

0 comments on commit 210fd69

Please sign in to comment.