Skip to content

Instantly share code, notes, and snippets.

@estebanmunchjones2019
Created April 1, 2021 16:06
Show Gist options
  • Save estebanmunchjones2019/1356264b1cc04f3090ef0026b19ccd4a to your computer and use it in GitHub Desktop.
Save estebanmunchjones2019/1356264b1cc04f3090ef0026b19ccd4a to your computer and use it in GitHub Desktop.
// pages/api/subscription.js
export default function handler(req, res){
//some code here to save the email to a database
const email = req.body.email;
return res.status(200).json({text: `${email} successfully subscribed`});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment