diff --git a/.idea/misc.xml b/.idea/misc.xml index 2c657d0..2c38384 100644 --- a/.idea/misc.xml +++ b/.idea/misc.xml @@ -8,7 +8,7 @@ - + \ No newline at end of file diff --git a/build.gradle b/build.gradle index a87da46..c95f794 100644 --- a/build.gradle +++ b/build.gradle @@ -17,8 +17,11 @@ dependencies { compile "org.jetbrains.exposed:exposed-core:0.21.1" compile "org.jetbrains.exposed:exposed-dao:0.21.1" compile "org.jetbrains.exposed:exposed-jdbc:0.21.1" - compile "com.h2database:h2:1.4.200" compile "mysql:mysql-connector-java:5.1.46" + + compile "io.vertx:vertx-core:3.8.5" + compile "io.vertx:vertx-web:3.8.5" + compile "io.vertx:vertx-lang-kotlin:3.8.5" } compileKotlin { diff --git a/src/main/kotlin/nl/lengrand/imdb/LoadImdb.kt b/src/main/kotlin/nl/lengrand/imdb/LoadImdb.kt index 7ba7bbf..eae10ed 100644 --- a/src/main/kotlin/nl/lengrand/imdb/LoadImdb.kt +++ b/src/main/kotlin/nl/lengrand/imdb/LoadImdb.kt @@ -1,6 +1,5 @@ package nl.lengrand.imdb -import loader.* import org.jetbrains.exposed.sql.Database import org.jetbrains.exposed.sql.SchemaUtils import org.jetbrains.exposed.sql.transactions.transaction diff --git a/src/main/kotlin/nl/lengrand/imdb/RandomQueries.kt b/src/main/kotlin/nl/lengrand/imdb/RandomQueries.kt index abf6108..d91e0ef 100644 --- a/src/main/kotlin/nl/lengrand/imdb/RandomQueries.kt +++ b/src/main/kotlin/nl/lengrand/imdb/RandomQueries.kt @@ -1,8 +1,10 @@ package nl.lengrand.imdb -import dsl.Ratings -import dsl.Titles +import nl.lengrand.imdb.dsl.Ratings +import nl.lengrand.imdb.dsl.Titles import org.jetbrains.exposed.sql.Database +import org.jetbrains.exposed.sql.and +import org.jetbrains.exposed.sql.select import org.jetbrains.exposed.sql.transactions.transaction import kotlin.system.measureTimeMillis @@ -71,5 +73,4 @@ fun main(){ println(result.last()) } }}"); - } \ No newline at end of file diff --git a/src/main/kotlin/nl/lengrand/imdb/api/ImdbServer.kt b/src/main/kotlin/nl/lengrand/imdb/api/ImdbServer.kt new file mode 100644 index 0000000..a774616 --- /dev/null +++ b/src/main/kotlin/nl/lengrand/imdb/api/ImdbServer.kt @@ -0,0 +1,11 @@ +package nl.lengrand.imdb.api + +import io.vertx.core.Vertx + +fun main(){ + Vertx.vertx().createHttpServer() + .requestHandler { request -> + request.response().end("Imdb Server") + + }.listen(8080) +} \ No newline at end of file diff --git a/src/main/kotlin/nl/lengrand/imdb/loader/RatingsLoader.kt b/src/main/kotlin/nl/lengrand/imdb/loader/RatingsLoader.kt index 4ad2932..480eee7 100644 --- a/src/main/kotlin/nl/lengrand/imdb/loader/RatingsLoader.kt +++ b/src/main/kotlin/nl/lengrand/imdb/loader/RatingsLoader.kt @@ -1,6 +1,6 @@ package nl.lengrand.imdb.loader -import dsl.Ratings +import nl.lengrand.imdb.dsl.Ratings import nl.lengrand.imdb.loader.generic.TableLoader import org.jetbrains.exposed.sql.Database import org.jetbrains.exposed.sql.statements.BatchInsertStatement diff --git a/src/main/kotlin/nl/lengrand/imdb/loader/TitlesLoader.kt b/src/main/kotlin/nl/lengrand/imdb/loader/TitlesLoader.kt index ff7831f..8519ac5 100644 --- a/src/main/kotlin/nl/lengrand/imdb/loader/TitlesLoader.kt +++ b/src/main/kotlin/nl/lengrand/imdb/loader/TitlesLoader.kt @@ -1,6 +1,6 @@ package nl.lengrand.imdb.loader -import dsl.Titles +import nl.lengrand.imdb.dsl.Titles import nl.lengrand.imdb.loader.generic.TableLoader import org.jetbrains.exposed.sql.Database import org.jetbrains.exposed.sql.statements.BatchInsertStatement