Skip to content

Instantly share code, notes, and snippets.

View mantonx's full-sized avatar
🎯
Focusing

Matt Panton mantonx

🎯
Focusing
View GitHub Profile

Keybase proof

I hereby claim:

  • I am mantonx on github.
  • I am mantonx (https://keybase.io/mantonx) on keybase.
  • I have a public key ASBgno5S8T1Un4G1XjsjcSyazO9N6hJCBt6lL7NlBnkDmAo

To claim this, I am signing this object:

@mantonx
mantonx / index.js
Created September 28, 2017 21:52
Weather Forecast Service on Lambda Edge
const https = require("https");
const darksky_endpoint = 'https://api.darksky.net/forecast/37737016f7549777487b431061f4e220/';
const geocode_enpoint = 'https://maps.googleapis.com/maps/api/geocode/json?sensor=false&address=';
exports.handler = function(event, context, callback) {
if (event.Records) {
const request = event.Records[0].cf.request;
getForecast(callback, request);
}