The Weather is a PHP-based command-line app that prints the current weather of any city which you specify as an argument.
- Clone this repository with
git clone https://github.com/zmilan/weather-cli
- Copy
.env.example
into.env
and adjust variables. Required variables are:OPEN_WEATHER_MAP_URL
- OpenWeatherMap API urlOPEN_WEATHER_MAP_KEY
- OpenWeatherMap API key (appid) value
- Run
docker-compose up -d && docker-compose exec weather_cli bash
./weather [city] [country]
. Examples:- Only with the city name:
./weather London
orphp weather London
- With the city and the country name:
./weather Trstenik SI
orphp weather Trstenik SI
- Only with the city name:
- Execute
XDEBUG_MODE=coverage ./vendor/bin/phpunit