This application is used to vote for a favourite team in various sports. The user first registers and then login to vote for his/her favourite team from a random set of events in a particular sport at a time.
- Node
- Sequelize, Postgres
- React
- Material UI
- Test : Supertest, Mocha, Jest
git clone https://github.com/iloveyii/sports-poll-2.git
- Their are two directories node and frontend, therefore install npm packages accordingly.
cd sports-poll-2
cd node && npm i
cd ..
cd frontend && npm i
- Create a db in Postgres and change .env file at node/.env accordingly.
- Run the tests for node as follows. Nb: it will reset db. Node server should not be running already.
cd node
npm run test
cd frontend
npm run test
cd node
npm run migrate:reset
npm start
- To see a list of API endpoints browse to
http://localhost:8080/api/v1
- Start React app like [You need to run it from same domain (localhost:8080) for cookies to work, therefore build React app and serve it from node app]
cd frontend
npm run build
- You may need to install the following.
- node >= 10.16.0
- npm >= 6.9.0
- Postgres
- Install aws command line on Ubuntu 18.04 as
sudo apt update
sudo apt install awscli
aws --version
sudo apt-get purge awscli && sudo pip install awscli // if cert err then use
- Configure aws command line