Functions

Add Netlify Functions.

./functions/

See also the Netlify docs: Functions overview

Example

./functions/hi-from-lambda.js
exports.handler = (event, context, callback) => {
  callback (null, {
    statusCode: 200,
    headers: {
      'Content-Type': 'application/json',
    },
    body: JSON.stringify({
      message: 'Hi from Lambda.',
    }),
  });
}

Edit this page on GitHub