This is just an example on how to hide environment variables and api keys with Netlify
You need to hook this up to Netlify or another serverless service like AWS. Netlify has CORS so you can only call this API from the same domain which is helpful in case that some one finds the endpoint