Skip to content
This repository has been archived by the owner on Dec 2, 2019. It is now read-only.
/ glimmer-weather Public archive

An example of using Glimmer to fetch and display local weather ✨ ☀️

Notifications You must be signed in to change notification settings

willrax/glimmer-weather

Repository files navigation

Glimmer Weather

A small Glimmer application to fetch your current location and display the daily summary.

Installation

  • git clone git@github.com:willrax/glimmer-weather.git
  • cd weather
  • yarn
  • ember serve

Fetching the Report

This app assumes that you're using the Darksky API. You'll also need to proxy these requets due to CORS. Here's a small Node app that can do it.j

var express = require('express');
var request = require('request');
var cors = require('cors');
var app = express();
var apiServerHost = 'https://api.darksky.net/forecast/<YOUR_API_TOKEN>';

app.use(cors());

app.use('/', function(req, res) {
  var url = apiServerHost + req.url;
  req.pipe(request(url)).pipe(res);
});

app.listen(process.env.PORT || 4000);

You'll just need to install express, request and cors to get it working. Then fill in your API_TOKEN.

Further Reading / Useful Links

About

An example of using Glimmer to fetch and display local weather ✨ ☀️

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published