-
Notifications
You must be signed in to change notification settings - Fork 340
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
Simplify function templates #6147
base: main
Are you sure you want to change the base?
Changes from 4 commits
8bffd9b
a3818ac
4effc08
34ef73a
fd10510
b30cc86
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,3 @@ | ||
// Docs on event and context https://docs.netlify.com/functions/build/#code-your-function-2 | ||
const handler = async (event) => { | ||
try { | ||
const subject = event.queryStringParameters.name || 'World' | ||
return { | ||
statusCode: 200, | ||
body: JSON.stringify({ message: `Hello ${subject}` }), | ||
// // more keys you can return: | ||
// headers: { "headerName": "headerValue", ... }, | ||
// isBase64Encoded: true, | ||
} | ||
} catch (error) { | ||
return { statusCode: 500, body: error.toString() } | ||
} | ||
export default async (req, context) => { | ||
return new Response('Hello, world!') | ||
} | ||
|
||
module.exports = { handler } |
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is an edge function template that we need to keep around