This repository was archived by the owner on Jan 28, 2025. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 458
Custom default handler #2007
Unanswered
patrickng-seek
asked this question in
Q&A
Custom default handler
#2007
-
There is inputs.handler but I am wondering how to use it, and how to call the default-handler. I copied the deprecated example which is not working, is there is a working example for current version?
const compat = require("@sls-next/next-aws-lambda");
module.exports = (page) => {
const handler = (event, context, callback) => {
// let's add some logging
console.log("URL: ", event.path);
// render page
compat(page)(event, context, callback);
console.log("This is cool (☞゚∀゚)☞");
};
return handler;
};
Beta Was this translation helpful? Give feedback.
All reactions
Replies: 1 comment
-
Hey there, sorry for the late response as I don't seem to get notifications for these and missed it. I am actually not sure as I think this was a community-contributed feature? Hopefully if you could mention which part of inputs.handler is not working we can try to get it to work again and possibly tested properly in the CI pipelines.
Beta Was this translation helpful? Give feedback.
All reactions
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment