diff --git a/build.gradle.kts b/build.gradle.kts index 4c59f90..aa6082b 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -10,7 +10,7 @@ val hexagonVersion = "2.8.0" val gradleScripts = "https://raw.githubusercontent.com/hexagonkt/hexagon/$hexagonVersion/gradle" ext.set("options", "-Xmx48m") -ext.set("applicationClass", "org.example.ApplicationKt") +ext.set("applicationClass", "com.hexagonkt.ws_chat.ChatPage") apply(from = "$gradleScripts/kotlin.gradle") apply(from = "$gradleScripts/application.gradle") @@ -19,7 +19,7 @@ apply(from = "$gradleScripts/native.gradle") defaultTasks("build") version="1.0.0" -group="org.hexagon.ws-chat" +group="com.hexagonkt.ws_chat" description="Service's description" dependencies { diff --git a/src/main/kotlin/Application.kt b/src/main/kotlin/ChatPage.kt similarity index 92% rename from src/main/kotlin/Application.kt rename to src/main/kotlin/ChatPage.kt index 1ad7c8a..c368d26 100644 --- a/src/main/kotlin/Application.kt +++ b/src/main/kotlin/ChatPage.kt @@ -1,4 +1,4 @@ -package org.example +package com.hexagonkt.ws_chat import com.google.gson.Gson import com.hexagonkt.core.ALL_INTERFACES @@ -18,7 +18,7 @@ internal lateinit var server: HttpServer internal val clientSessions = hashMapOf() internal fun main() { - LoggingManager.defaultLoggerName = "org.hexagon.ws-chat" + LoggingManager.defaultLoggerName = "com.hexagonkt.ws_chat" var userNumber = 1 server = serve(settings) { @@ -55,8 +55,8 @@ internal fun main() { } } -val gson = Gson() -fun broadcastMsg(sender: String?, msg: String) { +internal val gson = Gson() +internal fun broadcastMsg(sender: String?, msg: String) { val message = "$sender: $msg" val data = mapOf( "message" to message, diff --git a/sample-page/index.html b/src/main/resources/ChatPage.html similarity index 100% rename from sample-page/index.html rename to src/main/resources/ChatPage.html diff --git a/sample-page/chatPage.js b/src/main/resources/chatPage.js similarity index 100% rename from sample-page/chatPage.js rename to src/main/resources/chatPage.js diff --git a/sample-page/style.css b/src/main/resources/style.css similarity index 100% rename from sample-page/style.css rename to src/main/resources/style.css