const router = lambdaRouter();
router.use(async (event, context, next) => {
context.x = 1;
next();
});
router.get("/cool", async (event, context) => {
return {
statusCode: 200,
body: "Hello World",
};
});
router.use(async (event, context, next) => {
next();
});
router.all(async (event, context, callback) => {
console.log(context.x);
return {
statusCode: 500,
body: "Hello World",
};
});
-
Notifications
You must be signed in to change notification settings - Fork 0
rreeves8/lambda-router
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
Express like router for lambda
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published