https://github.com/kami/node-metar-service
REST service for translating METAR weather reports.
https://github.com/kami/node-metar-service
Last synced: 2 months ago
JSON representation
REST service for translating METAR weather reports.
- Host: GitHub
- URL: https://github.com/kami/node-metar-service
- Owner: Kami
- License: apache-2.0
- Created: 2013-10-08T10:36:32.000Z (almost 13 years ago)
- Default Branch: master
- Last Pushed: 2013-12-12T18:47:51.000Z (over 12 years ago)
- Last Synced: 2024-04-15T12:49:15.004Z (over 2 years ago)
- Language: JavaScript
- Homepage: http://www.metarservice.com
- Size: 277 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Metar REST service
Simple REST service for translating METAR weather reports.
# Usage
## Starting a server
```bash
bin/server [--port=] [--hostname=]
```
## Sending requests
### Single METAR report
```bash
curl -X POST -H "Content-Type: application/json" http://127.0.0.1:8888/metar -d '{"value": "metar string"}'
```
For example:
```bash
curl -X POST -H "Content-Type: application/json" http://127.0.0.1:8888/metar -d '{"value": "MMMX 252043Z 00000KT 6SM SCT020TCU OVC080 21/11 A3014 NOSIG RMK SLP056 57024 909 8/26/ HZY DSNT CB SW"}'
```
### Multiple METAR reports
```bash
curl -X POST -H "Content-Type: application/json" http://127.0.0.1:8888/metar -d '{"value": ["metar string1", "metar string 2"]}'
```
For example:
```bash
curl -X POST -H "Content-Type: application/json" http://127.0.0.1:8888/metar -d '{"value": ["MMMX 252043Z 00000KT 6SM SCT020TCU OVC080 21/11 A3014 NOSIG RMK SLP056 57024 909 8/26/ HZY DSNT CB SW", "MMMC 251948Z 26003KT 6SM SCT020TCU BKN080 OVC200 21/11 A3017 NOSIG RMK 8/267 HZY BINOVC"]}'
```
# TODO
* Cache responses
# License
Library is distributed under the [Apache license](http://www.apache.org/licenses/LICENSE-2.0.html).