A web application to make and share your polls. Share the polls and obtain real time analysis in the forms of charts. Uses the Google Charts API to display poll data. Passport JS GitHub strategy is used for user authentication.
Clone the project
git clone https://github.com/khansubhan95/voting-app.git
run
npm install
to install the dependencies
Rename .env.template to .env
Make an OAuth application on GitHub (settings - OAuth Applications) with project URL as http://127.0.0.1:3000 and callback URL as http://127.0.0.1:3000/auth/github/callback, note down generated ID and secret and fill it in .env
The project uses MongoDB to store data so make sure you have it installed. Use the MONGO_URI to access a DB from the app.
Sign up on heroku and install heroku CLI tools. In the project's root run heroku create. Now you need to set config vars for the heroku application.
GitHub ID and Secret Repeat the procedure given in development for GitHub, with the project URL to be the URL of the heroku app and the callback URL to be the /auth/github/callback appended to project URL.
APP_URL The URL generated by the heroku app
MONGO_URI Use a third party service like mLab to make a MongoDB database and note down the access point.
No change in remaining variables.
Goto settings - configvars
and for each variable (except PORT) in .env enter key and corresponding value generated above as given above.
View other dependencies in package.json
- Fork it
- Create your branch
- Commit your changes
- Push to branch
- Submit a pull request
MIT