项目作者: shalvah

项目描述 :
[Demo] Real-time polls app
高级语言: JavaScript
项目地址: git://github.com/shalvah/pollser.git
创建时间: 2017-12-05T11:56:13Z
项目社区:https://github.com/shalvah/pollser

开源协议:

下载


pollser

Polls app demo with real-time features. Tutorial here

Description

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.

Prerequisites

Getting started

Clone the project:

  1. git clone https://github.com/shalvah/pollser

Put your Pusher app credentials in a .env file in the project root:

  1. PUSHER_APP_ID=your-app-id
  2. PUSHER_APP_KEY=your-app-key
  3. PUSHER_APP_SECRET=your-app-secret
  4. PUSHER_APP_CLUSTER=your-app-cluster

Look for these lines of JavaScript in views/index.hbs:

  1. 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:

  1. node bin/seed.js
  2. npm start

Built With