text: export default async function Signup(req, res) {
      const email = req.body.email;
  
      if (!email) {
          return res.status(400).json({ error: 'Email is required' });
      }
  
      try {
          const API_KEY = process.env.BUTTONDOWN_API_KEY;
          const response = await fetch(
              `https://api.buttondown.email/v1/subscribers`,
              {
                body: JSON.stringify({
                  email: email,
                  tags: ['tylernix.me']
                }),
                headers: {
                  Authorization: `Token ${API_KEY}`,
                  'Content-Type': 'application/json'
                },
                method: 'POST'
              }
          );
          console.log(response);
          if (response.status >= 400) {
              const text = await response.text();
        
              if (text.includes('already subscribed')) {
                return res.status(400).json({
                  error: `You're already subscribed to my mailing list.`
                });
              }
        
              return res.status(400).json({
                error: text
              });
            }
            return res.status(201).json({ error: '' });
      } catch(error) {
          return res.status(500).json({ error: error.message || error.toString() });
      }
  }
  
  
  
  