A poll service that allows clients to create or vote polls with pre-defined choices. The poll can be configured as a public poll or a private poll. Clients are able to select one choice or multiple choices at a time.
The project is packed into Vagrantfile which contains all the declarative configuration about software requirements, packages, operating system configuration, etc...
-
Virtual Box (or any kind of virtual machine). Install Virtual box based on your OS System here
-
Vagrant. Install based on your OS System here
Firstly clone this project to your local and simply run the below command and wait until it finishing
cd yourRepoLocation
vagrant up
Port 80
in the virtual machine is forwarded to port 8080
on your local. Thus, access the project from your local browser through localhost:8080
or 127.0.0.1:8080
- You can manually adjust the port by changing this line in
Vagrantfile
at project directory:config.vm.network "forwarded_port", guest: 80, host: [your port]
Some useful vagrant commands:
vagrant status
: return the state of the machines Vagrant is managingvagrant ssh
: SSH into a running Vagrant machine and give you access to a shellvagrant halt
: shuts down the running machine Vagrant is managingvagrant destroy
: stops the running machine Vagrant is managing and destroys all resourcesvagrant reload --provision
: the equivalent of running a halt followed by an up and force the provisioners to run.
Other commands can be found here
- Vagrant - Setup the development environment
- Nginx - Reverse proxy server for more efficitently handling routes that require static files and forward dynamic routes to the proper server
- Node.js - Application server
- Express.js - The web framework for node.js
- Redis - In-memory database, responsible for high speed voting to avoid directly write to Postgresql DB which may cause losing the information due to high speed
- Postgresql - Relational database to store all the information
- Socket.io - Realtime, bi-directional communication between web clients and server, socket.io plays a crucial role in real-time updating poll result
- React - The client javascript framework
- Redux - The state management framwork for React