Serverless function deployed to the cloud (Vercel) that returns the capital of a country or the country of a capital city query.
Interacts with the REST Countries API to obtain the desired information.
- '/capital-finder?country=Chile' generates an http response: 'The capital of Chile is Santiago'
- '/capital-finder?capital=Santiago' generates an http response: 'Santiago is the capital of Chile'.