Simple web app to send daily covid-19 cases updates to users using Node, Express.js, Twilio Api and some other packages.
This application uses Twilio API to send daily covid-19 cases updates to the registered users.
Data Source - Covid 19 India API (Unofficial)
This web app is a part of Dev-Twilio Hackathon on dev.to
Users register with their Name, Phone Number and State (currently only Gujarat and Maharashtra is available) and they will get daily updates of cases in their state and in India, twice a day(9 am & 8 pm) via SMS (Twilio SMS Api)
User can choose to stop the service by sending "STOP" to the number(Twilio Number).
- Node.js web server using Express.js
- Basic web user interface using EJS for templating and Bootstrap for UI
- User interface to register
- Project Specific environment variables using
.env
files.
Config Value | Description |
---|---|
Account Sid | Your primary Twilio account identifier - find this in the Console. |
Auth Token | Used to authenticate - just like the above, you'll find this here. |
Phone number | A Twilio phone number in E.164 format - you can get one here |
After the above requirements have been met:
- Clone this repository and
cd
into it
git clone https://github.com/jamesshah/covid19-updates.git
cd covid19-updates
- Install dependencies
npm install
- Set your environment variables in .enc
create .env file in /covid19-updates directory
See Twilio Account Settings to locate the necessary environment variables.
- Run the application
npm start
This will run the server using nodemon package. It will reload whenever you change any files.
- Navigate to http://localhost:3000
That's it!
- Build a basic working app
- Update Readme File
- Add more states and regions
This template is open source and welcomes contributions.
No warranty expressed or implied. Software is as is.