1Vote is a full-stack web app for creating and sharing live web polls. It features a lightning-fast front end with data visualizations, as well as an available full standalone API for leveraging the site as a back-end service.
I created 1Vote as part of the freeCodeCamp online self-study program.
Technologies used include:
- React & Redux
- MongoDB / Mongoose
- Express.js
- Node.js
- D3
- Webpack with Babel and Sass loaders
- Passport
Make sure mongod
is installed and running. In a separate console window:
> npm install
> webpack
> npm start
(The final version will require ENV variables as well.)
GET /api/getPolls
POST /api/addPoll
Body should include the following JSON format:
{
"poll":
{
"title": "What's your zodiac sign?",
"choices": [{
"title": "Wut"
}, {
"title": "Virgo"
}],
"owner": "Brap"
}
}
POST /api/addVote/[pollID]
Body should include the following JSON format:
{
"choices":
{
"title": "Wut"
}
}
POST /api/addChoice/[pollID]
Body should include the following JSON format:
{
"choices":
{
"title": "Jawn"
}
}
DELETE /api/deletePoll/[pollID]