Bot that tweets the Covid19 Stats Of Nepal.
-
create
env
cp .env.example .env
update the application and database credentials.
.env
for simple sqlite database setupDB_CLIENT=sqlite DB_DATABASE=./storage/covid19-stats-nepal.sqlite
- If you wish to cron to run every minute inorder to fetch the data and the listed attributes (
recovered
,pcr_positive
,pcr_sample_tested
) to be observed for change. add these below env variables to.env
STAT_CRON_EXPRESSION=* * * * * DATA_TO_BE_OBSERVED=recovered,pcr_positive,pcr_sample_tested
- If you wish to cron to run every minute inorder to fetch the data and the listed attributes (
-
Run migration
yarn run knex migrate:latest
if you wish to seed
yarn run knex seed:run
-
Add Twitter Secrets to
.env
TWITTER_CONSUMER_KEY= TWITTER_CONSUMER_SECRET= TWITTER_ACCESS_TOKEN= TWITTER_ACCESS_TOKEN_SECRET=
-
Start the application
yarn dev (for development) NODE_ENV=production yarn start (for production)
yarn worker
yarn knex --help
- ES7 async/await
- Bookshelf ORM and Knex migrations
- SQLite (default) with support for MySQL and PostgreSQL
- dotenv for configuration management
- winston for logging
- jest, supertest for testing
- Standard JS for code linting
Template : Bootstrap Pricing, Timeline: Brady Wright