jeneljenel / weather-module
A module for weather forecasts.
Requires
- php: >=7.2
- anax/anax-cli: ^1.2
- anax/commons: ^2.0
Requires (Dev)
- anax/anax-lite: ^1.0.24
- anax/cache: ^2.0.0-beta.5
- anax/configure: ^2.0.0-beta.1
- anax/page: ^2.0.0-beta.1
- anax/request: ^2.0.2
- anax/response: ^2.0.1
- anax/session: ^2.0.1
- anax/view: ^2.0.2
- phpmetrics/phpmetrics: ^2
- phpunit/phpunit: ^7
README
WEATHER MODULE FOR ANAX
A weather forecast works with Anax framework. It is set up to use darksky.net. You have to have a valid api key.
Table of content
- Install as Anax module
- Configuration files
- Install using scaffold postprocessing file
- Install and setup Anax
- Dependency
Install as Anax module
This is how you install the module into an existing Anax installation.
Install using composer.
composer require jeneljenel/weather-module
Configuration files
Copy the needed configuration and setup the module as a route handler for the route weather
.
config, views
rsync -av vendor/jeneljenel/weather-module/config ./
rsync -av vendor/jeneljenel/weather-module/view/weather ./view
You have to create your own weather.php file. Copy /config/weather_sample.php
$ cd config
$ cp weather_sample.php weather.php
$ nano weather.php
Enter your valid apikey for darksky.net.
Exit the texteditor with ctrl + x
.
Enter Y
to save the chagnes.
Click return to save the file.
Install using scaffold postprocessing file
The module supports a postprocessing installation script, to be used with Anax scaffolding. The script executes the default installation, as outlined above.
bash vendor/jeneljenel/weather-module/.anax/scaffold/postprocess.d/302_weather.bash
The postprocessing script should be run after the composer require
is done.
Install and setup Anax
You need a Anax installation, before you can use this module. You can create a sample Anax installation, using the scaffolding utility anax-cli
.
Scaffold a sample Anax installation anax-site-develop
into the directory me
.
$ anax create me anax-site-develop
$ cd me
Point your webserver to me/htdocs
and Anax should display a Home-page.
Dependency
This is a Anax modulen and primarly intended to be used together with the Anax framework.
License
This software carries a MIT license. See LICENSE.txt for details.
Copyright (c) 2019 Tomie Lee