HSE Military Training Center bot for schedule
Simply access HSE Military Training Center schedule, prepare news for informing comrades and receive full pack of stickers with people you know well. Stack of technologies used:
- Awesome Telegraf wrapper for Telegram API.
- Heroku PaaS as hosting for app.
- Firebase API as database for user preferences and in-app data validation.
- exceljs for parsing and generating json-formatted schedule with metadata from *.xlsx file.
- google-news-rss for parsing Google RSS feed.
- Yandex.Metrica for statistics tracking.
PORT={Port you want to run on(etc. 5000)}
BOT_TOKEN={Your Telegram token}
METRICA_TOKEN={Your Yandex AppMetrica token}
FIREBASE_USERS_URL={Your Firebase_Users URL}
FIREBASE_USERS_PROJECT_ID={Your Firebase_Users project ID}
FIREBASE_USERS_CLIENT_EMAIL={Your Firebase_Users client email}
FIREBASE_USERS_PRIVATE_KEY={Your Firebase_Users private key}
heroku config:set BOT_TOKEN={Your Telegram token}
heroku config:set METRICA_TOKEN={Your Yandex AppMetrica token}
heroku config:set HEROKU_URL={Your Heroku URL}
heroku config:set FIREBASE_USERS_URL={YourFirebaseUsersURL}
heroku config:set FIREBASE_USERS_PROJECT_ID={Your Firebase_Users project ID}
heroku config:set FIREBASE_USERS_CLIENT_EMAIL={Your Firebase_Users client email}
heroku config:set FIREBASE_USERS_URL={Your Firebase_Users private key}
git add .
git commit -m "init deploy commit"
git push heroku master
heroku login
-> enter your credentialsheroku ps:scale web=1 -a {YourAppName}
-> to start dynoheroku ps:scale web=0 -a {YourAppName}
-> to shut down dyno
git add .
git commit -m "feature/fix commit"
git push origin HEAD:develop
https://github.com/oauthjs/express-oauth-server/blob/master/test/integration/index_test.js https://github.com/oauthjs/express-oauth-server/blob/master/test/unit/index_test.js
TODO:
- Правильный хендл всех ошибок про асинхронщину (async/await)
Обязательно используем Node.js v14 (хипдамп может не собраться) Разработка из-под впн (vpnbook) jupyter lab (не notebook)