So I was trying to host a serverless function today. First I tried Vercel, /api/index.js And it was working fine in dev but as soon as I deployed it it started sending the code in response instead of executing the file and sending response as stated in it.
So now I'm trying Netlify but no luck here either. /functions/tweet.js the response