Company
Date Published
Author
Naomi Pentrel
Word count
1602
Language
English
Hacker News points
None

Summary

Twilio has created an unofficial Eurovision Song Contest voting system that allows users to vote for their favorite songs and view the current top 10 results. The system uses a Twilio phone number as the event number, and users can vote by texting "2022" or another year followed by the country they want to vote for. Alternatively, users can text "Results" followed by the year to see the current top 10 results. The system stores votes in a MongoDB database and uses a hash of the user's phone number to ensure that only one vote per user is counted. The Twilio function is serverless and runs on a Node.js script, which connects to the MongoDB database and processes incoming messages. Once set up, users can use the phone number to participate in the voting system and share their results with others.