Git Product home page Git Product logo

weather_forecast_server's Introduction

weather_forecast_server

weather_forecast_server is a Dart 2 compliant sample REST server application utilizing Japanese Livedoor Weather Web Service (LWWS). This is a code sample and an attachment to the "Dart Language Gide" written in Japanese.

このリポジトリは「プログラミング言語 Dart 2の基礎」の添付資料であり、「RESTfulウェブ・サービスとDart (Dart in RESTful web services)」の「 簡単なクライアントとサーバ」の節で解説されています。この節ではサービスへの登録や専用のAPIが不要なウェブ・サービスを使った簡単なアプリケーションのクライアントとサーバのコード例を示しています。使用するウェブ・サービスはLivedoorのお天気Webサービス(Livedoor Weather Web Service / LWWS)で、現在全国142カ所の今日、明日、および明後日の天気予報、予想気温、および都道府県の天気概況情報を提供しています。

Installing

  1. Download this repository, uncompress and rename the folder to "weather_forecast".
  2. From your IDE, File > Open Existing Folder and select this weather_forecast folder.
  3. Using client/pubspec.yaml, build a build directory using build command.

Try it

  1. Run the server/bin/server.dart.
  2. From Chrome browser, call the server as http://127.0.0.1:8080/weather.
  3. Select another city from the select menu.

Note: The server supplies necessary files to the client according to the browser's requests:

  • build/client.html
  • build/client.css
  • build/client.dart.js
  • server/resources/favicon.ico
  • server/resources/(stored .gif image files)
    This server serves as a Proxy for the LWWS server also. Necessary data will be provided to the client through this proxy:
  • JSON weather forecast data for the requested city code.
  • not saved .gif image files for the forecast.

License

This sample is licensed under MIT License.

weather_forecast_server's People

Contributors

mitsuoka avatar

Stargazers

 avatar

Watchers

James Cloos avatar  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.