Prerequisite You should have installed Node.js (version 16 or higher) and
Docker.
Clone repo
Clone Clickvote repo:clickvote
folder on your computer.
Start MongoDB and Redis
Go toclickvote
folder and run the following command:
mongodb://localhost:27017/clickvote
and Redis at redis://localhost:6379
.
Setup env variables
Run this command:./start_services.sh
).
Also this command will install all libraries for you.
Run frontend and backend
frontend
and backend
services. You can access frontend
at http://localhost:4200
, backend is running at http://localhost:3000
.
Run websockets and consumers
Run this command:websockets
and consumers
services for you. Websockets
are running at http://localhost:3001
.
Modify React component
If you want to modify Clickvote React component and see how it changes in realtime together with a live websocket connection, use this command:http://localhost:4400
. There you will be able to see how React components look like and even interact with them! (make sure websockets
are running.)
To authenticate with websockets
server, copy paste public key
and id
from a vote setup page (see here how to create a new vote.)