Skip to content

Files

Latest commit

cfeaba5 · Apr 9, 2018

History

History

api-gw-geolocation

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
Dec 23, 2016
Dec 23, 2016
Apr 9, 2018

Geolocation using API Gateway

API Gateway requests go through CloudFront, and they will contain a few useful analytic headers, including the geo-location country where the request originated. This is a simple example that shows how to read out the country header and use it in your API.

Get started

  • run npm init to install the dependencies
  • run npm run create to deploy this project to AWS
  • grab the URL printed as the result, and GET it using CURL or paste into a browser