working on web interface

This commit is contained in:
2026-08-24 19:12:37 -04:00
parent 92c14dfc81
commit d62575df16
42 changed files with 5683 additions and 177 deletions
+43 -18
View File
@@ -4,9 +4,19 @@ plugins {
application
}
repositories {
mavenCentral()
/*
* Files supplied by the web project.
*
* This configuration is resolvable by this project but isn't itself
* published for other projects to consume.
*/
val webFiles = configurations.create("webFiles")
/*
{
isCanBeResolved = true
isCanBeConsumed = false
}
*/
dependencies {
// Ktor
@@ -22,7 +32,12 @@ dependencies {
// Logging
implementation(libs.ktor.server.logging)
implementation(libs.logback)
// Swagger/OpenAPI
implementation(libs.ktor.server.swagger)
implementation(libs.ktor.server.openapi)
implementation(libs.ktor.server.routing.openapi)
implementation(libs.ktor.server.content.negotiation)
// Testing
testImplementation(libs.ktor.server.test.host)
@@ -31,29 +46,39 @@ dependencies {
// Websockets
implementation(libs.ktor.server.websockets)
// Swagger/OpenAPI
implementation(libs.ktor.server.openapi)
implementation(libs.ktor.server.routing.openapi)
implementation(libs.ktor.server.content.negotiation)
// General Use
implementation(libs.kotlinx.datetime)
// Shared application code
implementation(project(":shared"))
implementation("ch.qos.logback:logback-classic:1.6.3")
/*
* Web application's generated files.
*
* This is a build-time dependency, not a runtime dependency.
* The web project exposes the files through its webDistribution
* outgoing configuration.
*/
webFiles(project(path = ":web", configuration = "webDistribution"))
}
application {
mainClass = "dev.geekback.dopewars.server.ServerKt"
}
//
//// Copy the JS+HTML from web to here
//tasks.processResources {
// dependsOn(":web:wasmJsBrowserProductionWebpack")
//
// from(project(":web")
// .layout
// .buildDirectory
// .dir("dist/js/productionExecutable"))
//}
/*
* Copy the web distribution into the server's resources.
*
* The files will end up at:
*
* server/build/resources/main/web/
*
* and therefore inside the server JAR at:
*
* web/
*/
tasks.processResources {
from(webFiles) {
into("web")
}
}
+23
View File
@@ -0,0 +1,23 @@
# Swagger Codegen Ignore
# Generated by swagger-codegen https://github.com/swagger-api/swagger-codegen
# Use this file to prevent files from being overwritten by the generator.
# The patterns follow closely to .gitignore or .dockerignore.
# As an example, the C# client generator defines ApiClient.cs.
# You can make changes and tell Swagger Codgen to ignore just this file by uncommenting the following line:
#ApiClient.cs
# You can match any string of characters against a directory, file or extension with a single asterisk (*):
#foo/*/qux
# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux
# You can recursively match patterns against a directory, file or extension with a double asterisk (**):
#foo/**/qux
# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux
# You can also negate patterns with an exclamation (!).
# For example, you can ignore all files in a docs folder with the file extension .md:
#docs/*.md
# Then explicitly reverse the ignore rule for a single file:
#!docs/README.md
+1
View File
@@ -0,0 +1 @@
3.0.81
File diff suppressed because one or more lines are too long
@@ -68,7 +68,7 @@ fun Application.module() {
*/
}
staticResources("/", "")
staticResources("/", "web")
}
}
-3
View File
@@ -1,3 +0,0 @@
<html>
<body><h1>This is the default page.</h1></body>
</html>