This is a web application for taking polls online.
Designed to have these features as listed by FreeCodeCamp:
-
As an authenticated user, I can keep my polls and come back later to access them.
-
As an authenticated user, I can share my polls with my friends.
-
As an authenticated user, I can see the aggregate results of my polls.
-
As an authenticated user, I can delete polls that I decide I don't want anymore.
-
As an authenticated user, I can create a poll with any number of possible items.
-
As an unauthenticated or authenticated user, I can see and vote on everyone's polls.
-
As an unauthenticated or authenticated user, I can see the results of polls in chart form. (Chart.js)
-
As an authenticated user, if I don't like the options on a poll, I can create a new option.
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.
Things you need to install to run the app:
The setup is
git clone https://github.com/MiloATH/VotingApp.git
cd VotingApp
npm install
Make a copy of sample.env
as .env
cp sample.env .env
Two options for the MongoDB: First option stores the MongoDB outside of the project folder (prefered due to easier data recovery):
mongod
OR
Second option stores the MongoDB in the same folder as the project: Note: stores db in data and includes flags --nojournal and --rest "$@" (see mongod file)
./mongod
In a new terminal go to the project folder (folder with server.js) and run
node server
Access the app through browser on localhost:8080 as the address.
Once you have the project installed and configured, you can run the tests. Make sure that MongoDB is running (mongod
).
npm test
Easily deployed to Heroku and MLab. Remember to set environment variables on Heroku from .env.
- MongoDB - NoSQL database
- Express.js - Web application framework
- Node.js - Platform for network applications
Please open any issues that you encounter on the GitHub repo issue page.
- Milo Hartsoe - MiloATH
- Hat tip to anyone who's code was used
- Readme template used