Skip to content

sndsabin/covid19-stats-nepal

Repository files navigation

Covid19 Stats Nepal

अधिसुचक

Bot that tweets the Covid19 Stats Of Nepal.

JavaScript Style Guide

Tweet

Tweet Tweet

Prerequisites

Installation

  1. create env

    cp .env.example .env

    update the application and database credentials.

    .env for simple sqlite database setup

    DB_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
    
  2. Run migration

     yarn run knex migrate:latest

    if you wish to seed

     yarn run knex seed:run
  3. Add Twitter Secrets to .env

    TWITTER_CONSUMER_KEY=
    TWITTER_CONSUMER_SECRET=
    TWITTER_ACCESS_TOKEN=
    TWITTER_ACCESS_TOKEN_SECRET=
    
  4. Start the application

    yarn dev (for development)
    NODE_ENV=production yarn start (for production)

To run the worker manually

yarn worker

for knex commands

yarn knex --help

Uses:

Credits

Template : Bootstrap Pricing, Timeline: Brady Wright

License

GNU General Public License v3.0