Coder Social home page Coder Social logo

raharrison / kotlin-ktor-exposed-starter Goto Github PK

View Code? Open in Web Editor NEW
567.0 10.0 77.0 204 KB

Starter RESTful service with websocket notifications using Kotlin, Ktor and Exposed with H2, HikariCP and FlyWay

Kotlin 88.56% HTML 10.20% Dockerfile 1.24%
kotlin kotlin-coroutines ktor exposed netty h2-database jackson rest-api websocket flyway

kotlin-ktor-exposed-starter's People

Contributors

akurdyukov avatar brunapereira avatar dependabot[bot] avatar frikit avatar nskvortsov avatar raharrison avatar sanao1006 avatar v3lop5 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

kotlin-ktor-exposed-starter's Issues

unresolved reference:exposed.....

import org.jetbrains.exposed.sql.Table
unresolved reference:exposed.....
i have compile exposed successful like this: compile "org.jetbrains.exposed:exposed:0.10.4"

Why is Hikari set to `isAutoCommit = false`

Also, shouldn't the newSuspendedTransaction {} block in DatabaseFactory be using Dispatchers.IO? That's how JetBrains does it in the Ktor docs.

Mostly, I'm just wondering why you would want Hikari set to isAutoCommit = false.

Thanks!

netty -> CIO

Recent Kotlin versions have Coroutine IO (CIO) library. Do you think it's reasonable to migrate netty to CIO for this starter?

Can not start app with ./gradlew run

Hey @raharrison ,

this is probably a question only a total Kotlin newbie can ask- I do it anyway :)
I'm looking at different ktor example projects to learn its structure, and while I can start most of them with ./gradlew run it seems I can't start yours. Can you let me know what I'm doing wrong?
I tried to find some explanation in the README. So once I get it to run I'm happy to provide a PR against your README (in case I didn't just miss the explanation).

My assumption is that I can run the service somehow- is run the correct command?

Here's what's going wrong:

tuhlmann:~/.../kotlin/kotlin-ktor-exposed-starter$ ./gradlew run
> Task :run FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':run'.
> No main class specified and classpath is not an executable jar.

Thanks,
Torsten.

bug: application.conf is ignored

the port configuration is hard-coded, and the application.conf is ignored.
The following code would fix the issue

 embeddedServer(Netty, commandLineEnvironment(args)).start(wait = true)

application.conf:    
ktor {
    deployment {
        port = 8000
        watch = [  build ] 
    }

    application {
        modules = [ MainKt.mainModule ]
    }
}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.