GithubHelp home page GithubHelp logo

weeze's Introduction

System requirements

  • make (GNU Make) >= 3.81
  • node >= 16.0.0
  • yarn >= 1.22.18
  • docker >= 20.10.20
  • docker-compose >= 2.12.1

Initial steps

  1. $ make up - run docker containers
  2. $ make init - install node_modules, init migrations, run seeds
  3. $ yarn weather:fetch - run a script to fetch weather for available cities

Run project

  1. $ make up - run docker containers
  2. $ yarn dev - run server

API

API available on http://localhost:3000, with global prefix /api/v1

cURL

command description
$ curl --location --request GET 'localhost:3000/api/v1/weather/available-cities' Get available cities
$ curl --location --request GET 'localhost:3000/api/v1/weather?city=<CITY>&date=<DAY>' Get weather for a city. CITY - name of city DAY - Allowed a relative day (today, tomorrow, yesterday) and date in ISO format (2022-12-09 or 2022-12-09T14:00:00)
$ curl --location --request GET 'localhost:3000/api/v1/weather/temperature-avg?city=<CITY>' Get AVG (for all time) temperature for city. CITY - name of city
$ curl --location --request GET 'localhost:3000/api/v1/weather/popular-city' Get most searched city

Description

A Country data was used from this repository. It's hard to find a good package. So, I just save a time.

I don't know a Weather API throughput, so I made a little throttling.

weeze's People

Contributors

jawell avatar

Watchers

 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.