This is the Cowin vaccine tracker graphql server + Telegram bot. It is a nodejs Apollo server for deployment in a container.
- Telegram application
- Typescript/Nodejs
Few changes that you need to make in the code to start using your own bot.
- You need to get authorization token from @BotFather and replace your code in
src/clients/telegram.ts
file. - Get district code for your district from cowin website cowin and replace it in
src/services/center.ts
file. - Update your docker hub
username
underdocker-build
inpackage.json
file. (For pushing image into docker hub)
To build and run this in a docker container:
npm install
npm run build
npm run docker-build
npm run docker-run
Point your browser to localhost:5001/graphql to use the GraphiQL query interface.
To run this locally
npm install
npm start
query getCenterDetails {
centers {
centerIdentifier
name
sessions {
id
date
availableCapacity
ageLimit
vaccineName
}
feeType
}
}
mutation sendMessageToBot {
sendMessage {
message
status
}
}