Added Read,e and examples
This commit is contained in:
46
README.md
Normal file
46
README.md
Normal file
@@ -0,0 +1,46 @@
|
|||||||
|
# Metar RSS Generator
|
||||||
|
This node app generates rss XML files that you can then serve as an RSS feed.
|
||||||
|
|
||||||
|
## Install and Setup (Linux)
|
||||||
|
```sh
|
||||||
|
# Clone the repo
|
||||||
|
sudo mkdir -p /opt
|
||||||
|
cd /opt && sudo git clone https://git.entropic.pro/Aiden/metar-rss
|
||||||
|
|
||||||
|
# Edit config, see below for details
|
||||||
|
sudo nano /opt/metar-rss/config.json
|
||||||
|
|
||||||
|
# Create service user
|
||||||
|
sudo useradd -M metar-rss
|
||||||
|
sudo usermod -L metar-rss
|
||||||
|
|
||||||
|
# Create needed directories and ensure they are owned by the user
|
||||||
|
sudo mkdir -p /var/www/weather
|
||||||
|
sudo chmod -R metar-rss:metar-rss /var/www/weather
|
||||||
|
sudo chmod -R metar-rss:metar-rss /opt/metar-rss
|
||||||
|
|
||||||
|
# Install and start service (systemd)
|
||||||
|
sudo cp /opt/metar-rss/metar-rss.service /etc/systemd/system/
|
||||||
|
sudo systemctl daemon-reload
|
||||||
|
sudo systemctl enable --now metar-rss.service
|
||||||
|
```
|
||||||
|
|
||||||
|
## Config
|
||||||
|
The following settings can be set in `config.json`:
|
||||||
|
|
||||||
|
- outputdir
|
||||||
|
- This is the base directory where the RSS XML files will be output
|
||||||
|
- icaos
|
||||||
|
- This is an array of ICAO Airport codes to generate feeds for.
|
||||||
|
- siteurl
|
||||||
|
- This should be the base url for your website
|
||||||
|
- rss-baseurl
|
||||||
|
- This should be the base url path where these files will be served.
|
||||||
|
- Eg. `https://example.com/weather` will indiate that KJFK's metar will be served at `https://example.com/weather/metar/KJFK/rss.xml`
|
||||||
|
- check-interval
|
||||||
|
- This sets how often the app will check for new data in minutes
|
||||||
|
- loglevel
|
||||||
|
- Uses standard loglevel values, set 7 or higher for all logs (debug)
|
||||||
|
|
||||||
|
## Webserver
|
||||||
|
Note that this app only generates the rss files, you will still need to serve them with some kind of webserver, I have included an example caddy configuration for referance.
|
||||||
13
metar-rss.service
Normal file
13
metar-rss.service
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
[Unit]
|
||||||
|
Description=Monitors, generates and updates an RSS Feed File for Airport METARs
|
||||||
|
After=network.target
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
Restart=always
|
||||||
|
RestartSec=5
|
||||||
|
User=metar-rss
|
||||||
|
WorkingDirectory=/opt/metar-rss
|
||||||
|
ExecStart=/usr/bin/node index.js
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
||||||
Reference in New Issue
Block a user