[Demo] Real-time polls app
Polls app demo with real-time features. Tutorial here
The app’s home page shows a list of polls. Voting for an option in a poll updates the number of votes displayed next to that option across all clients in real-time.
Clone the project:
git clone https://github.com/shalvah/pollser
Put your Pusher app credentials in a .env
file in the project root:
PUSHER_APP_ID=your-app-id
PUSHER_APP_KEY=your-app-key
PUSHER_APP_SECRET=your-app-secret
PUSHER_APP_CLUSTER=your-app-cluster
Look for these lines of JavaScript in views/index.hbs
:
var pusher = new Pusher('YOUR_APP_KEY', {cluster: 'YOUR_APP_CLUSTER'});
Insert your Pusher app key and cluster in the appropriate places.
Start your MongoDB server by running mongod
.
Then:
node bin/seed.js
npm start