https://github.com/cosmicjs/cosmicapp-voting-app
A voting app built using React, MobX and Cosmic JS
https://github.com/cosmicjs/cosmicapp-voting-app
Last synced: 3 months ago
JSON representation
A voting app built using React, MobX and Cosmic JS
- Host: GitHub
- URL: https://github.com/cosmicjs/cosmicapp-voting-app
- Owner: cosmicjs
- Created: 2016-08-11T20:57:48.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2017-04-13T23:44:34.000Z (over 8 years ago)
- Last Synced: 2025-04-05T05:11:22.644Z (9 months ago)
- Language: JavaScript
- Homepage: http://voting-app.cosmicapp.co
- Size: 24.4 KB
- Stars: 72
- Watchers: 6
- Forks: 29
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Voting App
=====================

A voting app that uses [React](https://facebook.github.io/react) for UI, [MobX](https://mobxjs.github.io/mobx) for state management, [React Router](https://github.com/reactjs/react-router) for smooth view transitions, [Cosmic JS](https://cosmicjs.com) for the [CMS API](https://cosmicjs.com), [React Bootstrap](https://react-bootstrap.github.io/) for the frontend framework, [Shorti](https://www.npmjs.com/package/shorti) for easy inline styles. View the [demo here](http://voting-app.cosmicapp.co/).
### Getting started
```
git clone https://github.com/cosmicjs/cosmicapp-voting-app
cd cosmicapp-voting-app
npm install
```
##### Run in development with hot reloading
```
npm run development
open http://localhost:3000
```
##### Run in production connected to default bucket
```
npm start
open http://localhost:3000
```
### Create Your Own Polls
It's easy to create your own polls. All you have to do is:
1. Create a bucket on Cosmic JS.
2. Find the Voting App in the Apps section of your bucket.
3. Install the voting app.
4. Deploy your app to the web
##### Run in production connected to your bucket
```
COSMIC_BUCKET=your-bucket-slug npm start
open http://localhost:3000
```
### CMS API
By default the posts are connected to the Cosmic JS bucket `voting-app`. [Sign up for Cosmic JS](https://cosmicjs.com) to add your own bucket, and edit the `config.js` file to point to your bucket.