Installation
Tools
In order to run this project you need to have the following tool installed:
- PostgresQL
- mailcatcher, mailcatcher creates a mailserver locally on your pc. All mail sent from the API is cought here, you end up with a mailbox with every outgoing mailaddress. Unix-like systems: gem install mailcatcher. Windows users can try mailcatcher as well, but Papercut has an easier installation.
- lombok, lombok allowes users to uses annotations to create getters, setters, etc. All the things needed in a data class. There is a lombok IntelliJ plugin which you should install.
Clone and setup
- Clone this project into a folder you link via
git clone git@github.com:WISVCH/events.git
. - Import the project using IntelliJ IDEA, we recommend using IntelliJ IDEA Ultimate (free for students) because it includes support for Spring.
- Enable annotation processing
Preferences > Build, Execution, Depolyment > Compiler > Annotiation Processing
. - Create an PostgreSQL database (Tutorial PostgreSQL database).
- Duplicate the file
config/application.yml.example
and change its name toconfig/application.yml
and change:- Replace
<MyDb>
with the name of the database you just created. - Replace
<MyDbUser>
with the database user. - Replace
<MyDbPassword>
with the password of the database user. - Replace
<MyLDAPgroup>
with a committee you are in (e.g. akcie, choco)- Note: if you are not in a committee you can use
users
as LDAPgroup
- Note: if you are not in a committee you can use
- Replace
- Start the project by right-clicking
EventsApplication
and clicking ‘Run’
Running test
The test of the project can be run via the command
./gradlew test
Or by right-clicking the test folder and selecting Run 'All the test'