File tree Expand file tree Collapse file tree 4 files changed +7
-13
lines changed Expand file tree Collapse file tree 4 files changed +7
-13
lines changed Original file line number Diff line number Diff line change 1
1
kotlin.code.style =official
2
2
kotlin.js.compiler =ir
3
- kotlin.incremental =true
4
- kotlin.incremental.js =true
5
- kotlin.incremental.js.ir =true
6
- kotlin.incremental.js.klib =true
Original file line number Diff line number Diff line change 1
- import org.w3c.dom .HTMLFormElement
1
+ import web.html .HTMLFormElement
2
2
import react.*
3
- import org.w3c.dom .HTMLInputElement
3
+ import web.html .HTMLInputElement
4
4
import react.dom.events.ChangeEventHandler
5
5
import react.dom.events.FormEventHandler
6
- import react.dom .html.InputType
6
+ import web .html.InputType
7
7
import react.dom.html.ReactHTML.form
8
8
import react.dom.html.ReactHTML.input
9
9
Original file line number Diff line number Diff line change 1
- import kotlinx.browser .document
1
+ import web.dom .document
2
2
import react.create
3
3
import react.dom.client.createRoot
4
4
Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ val connectionString: ConnectionString? = System.getenv("MONGODB_URI")?.let {
20
20
}
21
21
22
22
val client = if (connectionString != null ) KMongo .createClient(connectionString).coroutine else KMongo .createClient().coroutine
23
- val database = client.getDatabase(connectionString?.database ? : " test " )
23
+ val database = client.getDatabase(connectionString?.database ? : " shoppingList " )
24
24
val collection = database.getCollection<ShoppingListItem >()
25
25
26
26
fun main () {
@@ -47,9 +47,7 @@ fun main() {
47
47
ContentType .Text .Html
48
48
)
49
49
}
50
- static(" /" ) {
51
- resources(" " )
52
- }
50
+ staticResources(" /" , " static" )
53
51
route(ShoppingListItem .path) {
54
52
get {
55
53
call.respond(collection.find().toList())
@@ -66,4 +64,4 @@ fun main() {
66
64
}
67
65
}
68
66
}.start(wait = true )
69
- }
67
+ }
You can’t perform that action at this time.
0 commit comments