Initial commit
This commit is contained in:
20
src/jvmMain/kotlin/nl/astraeus/vst/chip/Main.kt
Normal file
20
src/jvmMain/kotlin/nl/astraeus/vst/chip/Main.kt
Normal file
@@ -0,0 +1,20 @@
|
||||
package nl.astraeus.vst.chip
|
||||
|
||||
import io.undertow.Undertow
|
||||
import io.undertow.UndertowOptions
|
||||
|
||||
fun main() {
|
||||
Thread.setDefaultUncaughtExceptionHandler { _, e ->
|
||||
e.printStackTrace()
|
||||
}
|
||||
|
||||
val server = Undertow.builder()
|
||||
.addHttpListener(Settings.port, "0.0.0.0")
|
||||
.setIoThreads(4)
|
||||
.setHandler(RequestHandler)
|
||||
.setServerOption(UndertowOptions.SHUTDOWN_TIMEOUT, 1000)
|
||||
.build()
|
||||
|
||||
println("Starting server at port ${Settings.port}...")
|
||||
server?.start()
|
||||
}
|
||||
Reference in New Issue
Block a user