Code Monkey home page Code Monkey logo

openweather-vue's Introduction

A simple Vue.js app, fetching weather forecast data for a user-selected location.

Overview

I use the Google Geocode API for location suggestions based on user input or GPS position (if available), and OpenWeatherMap API to render 5 days weather forecast.

I also use Vuex for state management, for no other reason than getting to know the workings of it. HTTP requests are handled with axios. Finally, I use a local, patched version of Vue Select component, with a couple of PRs baked in. It should be updated, eventually.

This app was made while I learn webpack, Vue.js, ES6, Vuex, Mocha and expect — and I have a lot to learn. I had to cheat and retrofit the tests, so this was not build with TDD, but one has to start somewhere! I welcome constructive critisism and well documented PRs that whould make me, and anybody else, better developers!

ToDo

Instructions

If you want to run this project, you need a couple of API keys: Google Geocoding API and OpenWeatherMap. These are saved in Vuex state — there is a related comment in /src/js/vue/store.js.

There are 4 npm scripts:

  • npm run dev starts the webpack-dev-server with your local IP at the default port (8080), for you to develop your application. I still have an issue with rebuilding and injecting the stylesheets and I will find a solution, sooner or later…
  • npm run build compiles production-ready styles and scripts
  • npm run test runs the Mocha / expect tests, once
  • npm run watch runs the above tests continuously, to enable true Test Driven Development

openweather-vue's People

Contributors

pvgr avatar

Watchers

 avatar  avatar  avatar

Forkers

anbucher

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.