Lombok plugin need to be install in order to run the application.
Initially in task A we wanted VoteDevice to be associated with a user, such that each user has an own voting device. An example of this use could be to have a collection of people wanting to vote at the same time, because then they need a votingDevice each. After some discussion we figured out that it would be easier to implement the Device as just a Voter, not having to have a relationship with a user. An example of this use would be in a classroom where the students go and vote on the votingDevice after each other.
Using this latter approach we could let a Device send in the number of yes and nos, count them and create
a new vote for each yes and no. The votes are then persisted using voteRepository.saveAll(votes).
Before running the postman collections be sure to fill the databse. As of now check the branch "throwaway/databaseInitialize" and make sure that the @Autogenerated on ID in voter and poll is commented out when running with the databaseIntialize and also make sure that the @PostConstruct in databaseInitalize.java is not commented out. Restart the application and remove @Postconstruct in databaseInitalize and re-add the autogenerated ID for poll and voter. This wil be fixed at a later point as there were some problems using a data.sql file.
We use RabbitMQ configured with Spring Boot as our messaging protocol to publish finished polls.
How to use
- Start RabbitMQ server using
rabbitmq-server. - Clone and start the receiver.
- Start PollApplication.
- Create some polls with short time duration and wait for the publisher to publish the results.
- feat/
- hotfix/
- fix/
- throwaway/
etc..
-
hotfix/bug-when-user-tries-to-use-æøå-in-poll-title-the-server-dies -
hotfix/æøå-crash
Eksempel
Added
- Route guarding.
- Private polls
- Admin page
- My polls page
Changed
- Now always warns user before they can navigate back
- History mode instead of hash mode in router.
Slett branch etter merge.
Om merges også blir lagt labels på så er det litt enklere å lete etter konkrete merges senere ;)
We use Heroku for deployment.
How to deploy
Download Heroku CLI if you dont have it.
heroku login
heroku git:remote -a pollapplication-dat250-group5
git push heroku master or git push heroku <your-branch>:master if on another branch then master.
The deployment is here!