https://github.com/tommycpp/vote
Simple vote system based on Node.js
https://github.com/tommycpp/vote
expressjs nodejs redis vote
Last synced: 5 days ago
JSON representation
Simple vote system based on Node.js
- Host: GitHub
- URL: https://github.com/tommycpp/vote
- Owner: TommyCpp
- Created: 2017-07-01T02:39:08.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2017-07-21T15:25:39.000Z (almost 8 years ago)
- Last Synced: 2025-03-02T13:30:17.023Z (4 months ago)
- Topics: expressjs, nodejs, redis, vote
- Language: JavaScript
- Homepage:
- Size: 196 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Vote
Simple vote system boosted by Node.js,Express and Vue.js## Setup
* Download the file / Clone
* Use `npm install` to install the package
* Create the `config.js` by `config.example.js`
* Use http://localhost:3000 to access## Feature
* High concurrency
* Use Redis as main database
* Config the vote item and subject## API
Method | URL | Header | Expect Return | Comment
-------|-----|--------|---------------|--------
GET | /vote | | `{ canadians:[], limit:Number}; Header: X-VOTE-TOKEN`| List of the Canadians,
Note that the *client* shall save the X-VOTE-TOKEN to local storage and if the user flush the page, get another token, **old token shall remain** and the new one need to be abandoned
POST| /vote |`X-VOTE-TOKEN`| `{ target:String[] }`| Choose
GET | /admin | | `Header:X-AUTHENTICATION` | Admin page
POST | /admin/delete | `X-AUTHENTICATION` | | Delete all the data