https://github.com/mikkohei13/telelaitos
Node.js app to send FinBIF data to a smartphone with Telegram.
https://github.com/mikkohei13/telelaitos
biodiversity finbif nodejs testing
Last synced: 5 months ago
JSON representation
Node.js app to send FinBIF data to a smartphone with Telegram.
- Host: GitHub
- URL: https://github.com/mikkohei13/telelaitos
- Owner: mikkohei13
- License: mit
- Created: 2017-01-10T17:35:47.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2017-01-18T22:28:25.000Z (over 9 years ago)
- Last Synced: 2024-01-30T05:36:58.287Z (over 2 years ago)
- Topics: biodiversity, finbif, nodejs, testing
- Language: JavaScript
- Homepage:
- Size: 66.4 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
Node.js app to send FinBIF data to a smartphone.
FinBIF API's -> Telelaitos (Node.js) -> Telegram Bot API -> Telegram
Deploy to Heroku
----------------
Set keys to .env:
LAJI_TOKEN=your-api.laji.fi-token
TELEGRAM_LAJIBOT_TOKEN=your-telegram-bot-token
CRONITOR_PING_ID=ping-id
LATESTID_FILENAME=latestid.prod.txt
Set keys to Heroku dashboard app settings: https://dashboard.heroku.com/apps/
On development server change latestid.prod.txt to latestid.dev.txt, which won't be committed to Heroku.
Run locally:
heroku local
Deploy to Heroku:
git push heroku master
Tail Heroku logs:
heroku logs --tail
Call
----
Debug, resend latest document:
https://MY-APP-NAME.herokuapp.com/vihkolatest?telegram=0&resend=1&cronitor=0
Production, send only new document:
https://MY-APP-NAME.herokuapp.com/vihkolatest?telegram=1&resend=0&cronitor=1
Crontab:
*/5 * * * * wget -qO- 'myAppUrl' &> /dev/null # Notice quotes around the url!
TODO
====
- Description
- Don't stop on cronitor error
- Latest observations with gathering date and document team