This project purpose is to power the MiXiT 2017 website.
This project software design goal is to demonstrate what a functional web application developed with Spring Framework 5 and Kotlin can look like:
- Reactive
- Simple, fast to start, efficient request processing, low memory consumption
- Cloud Native
- Constructor based injection
- More functional style and less annotation based than typical Spring applications
- Immutable Pojos
- Take advantage of Kotlin extensions and reified type parameters
The technologies used are:
- Language: Kotlin
- Web framework: Spring Boot and Spring Web Reactive Functional
- Engine: Netty used for client and server
- Templates: Mustache (will be migrated later to Kotlin typesafe templates)
- Reactive API: Reactor
- Persistence : Spring Data Reactive MongoDB
- Build: Gradle Script Kotlin
- Testing: Junit
Prerequisite:
- Install MongoDB and run
mongod - Install Java 8
- Install Gulp for development mode
- Depending on your platform, you may have to install libpng (On mac with
brew install libpngfor example)
To import the project in IDEA:
- Clone the project
git clone https://github.com/mix-it/mixit.git - Make sure you have at least IntelliJ IDEA 2016.3 and IDEA Kotlin plugin 1.1.0-beta-17+
- Import it in IDEA as a Gradle project
- Right click on the project -> Open module settings -> Modules -> mixit -> Kotlin and make sure Kotlin 1.1 language level and that Java 1.8 bytecode options are selected
- Right click on
Application.kt-> Run or Debugmixit.ApplicationKt
To run the application in development mode:
- Run
./gradlew build - Run
gulp watch - Install live reload extension in your browser
- In IDEA, right click on
Application.kt-> Run or Debugmixit.Applicationkt - Static resources will be processed automatically, as well template modification, only modifying
messages_en.propetiesandmessages_fr.propetieswill require building the project (cmd + F9 on Mac)
To package and run the application from the executable JAR:
./gradlew build
java -jar build/libs/mixit-1.0.0-SNAPSHOT.jar
To deploy the app on CF:
./gradlew clean build
cf push
To test the application from a browser, go to http://localhost:8080/.
