Your first serverless function in one tweet:
1. Save this as `functions/my-first-function.js`:
exports.handler = async () => ({
statusCode: 200,
body: 'boop',
});2. Deploy to Netlify
3. Call it at <your site>/.netlify/functions/my-first-functionhttps://t.co/cRgT9Yxbmy— Netlify (@Netlify) December 20, 2019
This is cgi-bin
all over again, right?
💡 Looking to deploy a website to Netlify? You can find my notes here.