martinl / weather-module
A weather module for the anax framework.
Requires
- php: >=7.2
- anax/commons: ^2.0.0@beta
Requires (Dev)
- anax/anax-lite: ^1.0.24
- anax/page: ^2.0.0@alpha
- anax/view: ^2.0.0@alpha
- phpunit/phpunit: ^7
README
Install as Anax module
This is how you install the module into an existing Anax installation.
- Install using composer.
composer require martinl/weather-module
- Copy the needed configuration and setup the module as a route handler for the routes
weather-api
andweather2-api
for the REST api.
rsync -av vendor/martinl/weather-module/config/ ./config/
- Copy the Controllers and Models required.
rsync -av vendor/martinl/weather-module/src/ ./src/
- Now copy the views.
rsync -av vendor/martinl/weather-module/view/ ./view/
- Now copy the API documentation for the route
weather-text
.
rsync -av vendor/martinl/weather-module/content/weather-text.md content/weather-text.md
- Create config/api_keys.php that will contain all api keys, like so,
<?php
return ["key1" => "xxx",
"key2" => "xxx",
"key3" => "xxx"
];
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/martinl/weather-module/.anax/scaffold/postprocess.d/710_weather_module.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 a/
.
anax create a ramverk1-me-v2
cd a
Point your webserver to a/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) Martin Ledel