Giter VIP home page Giter VIP logo

weather-app's Introduction

weather-app

A Sails v1 application

Demo the app: cd weather-app && sails lift Test the app:

./node_modules/mocha/bin/mocha ./test/controller.indexcontroller.js
./node_modules/bin/mocha ./test/helper.zip-lookup.js

Goal of the application is to allow searching for weather by zip code and displaying results using the DarkSky API.

Considerations

  • DarkSky API accepts latitude, longitude arguments in query
    • Use of another API may be necessary to translate zip code input to latitude, longitude
  • If there is a need to look up the zip code, it may be good to use some sort of persistence (db, disk cache) to avoid repeated calls
  • Functionality related to API calls should be extracted into a service layer
  • Tests should cover the ability of the service layer to return data
  • DarkSky API key should be stored in a server-side configuration file or within an environment variable, not committed to repository

Layout and design

  • Web application initially loads current forecast information for 5 select zip codes across the contiguous US
    • San Diego, CA
    • Seattle, WA
    • Denver, CO
    • Portland, ME
    • Miami, FL
  • Submission (POST) to backend handled by controller method
    • Backend services (SailsJS helpers) leveraged to
      • query/store the information for a zip code, city, latitude, and longitude
      • API call for zip code lookup
      • API call for weather forecast
  • Result data may be displayed on a separate page, traditional MVC

Enhancements

  • Implement VueJS Single Page app
    • axios call to backend API endpoint, consume JSON result
    • refresh page data
  • Experiment with different taskrunner pipelines (Gulp)
    • SailsJS defaults to Grunt

weather-app's People

Contributors

drjcfitz avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.