Skip to content
Open
Changes from 1 commit
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
c1e5dea
Add solution including MongoDB
SebastianAigner Apr 16, 2020
566b657
Group ShoppingListItem routes by path
SebastianAigner Apr 16, 2020
00286de
Fix https://github.com/kotlin-hands-on/hands-on/issues/82
SebastianAigner Jun 29, 2020
b27964a
kotlin.browser => kotlinx.browser
SebastianAigner Aug 26, 2020
f8d5666
Update useEffect to use new, consistent API
SebastianAigner Jul 2, 2021
ef6c599
Update for wrappers pre.265
SebastianAigner Nov 11, 2021
299cc97
Change capitalization of "App"
SebastianAigner Nov 11, 2021
4ecbd06
Change capitalization of "InputComponent"
SebastianAigner Nov 11, 2021
db7eeaf
Use delegation
SebastianAigner Nov 11, 2021
3283b7f
Update to new Kotlin-React DSL
SebastianAigner Feb 15, 2022
fce5c5a
Adjust for Ktor 2.x APIs
SebastianAigner Aug 10, 2022
b4bebe1
Remove unnecessary window.location.origin usage.
NightlyNexus Oct 2, 2022
8aba666
Update Server.kt
pristalovpavel Mar 27, 2023
f96177b
update: js ir and version upgrade
danil-pavlov Jun 17, 2023
6fcd4c1
Gradle: use Configuration avoidance
CristianGM May 2, 2022
c28fdcc
Bumpt version to 1.9.10 with the relevant changes
JSMonk Aug 30, 2023
6b9788e
remove unused import
JSMonk Aug 30, 2023
874ac28
Remove unnecessary `get` handler
JSMonk Sep 4, 2023
e4c122e
Add basic UI for the compose app with Wasm
JSMonk Jan 5, 2024
e63afab
Add API emulation
JSMonk Jan 5, 2024
d61ee81
Add KTO
JSMonk Jan 5, 2024
27641ba
Use syntax sugar the state
JSMonk Jan 5, 2024
ce02939
Add gradle property to switch in between JS and WASM
JSMonk Jan 5, 2024
5cc51be
Uncomment server logic for MongoDB
JSMonk Jan 5, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update Server.kt
This string allows you, for example, upload your app to Heroku while you DB is in MongoDB Atlas. In this case CORS blocks your POST requests. See https://youtrack.jetbrains.com/issue/KTOR-4008/POST-request-to-database-returns-403-error#focus=Comments-27-6434385.0-0
  • Loading branch information
pristalovpavel authored and SebastianAigner committed Mar 27, 2023
commit 8aba666c051183e51f433e9f140ec8336f6381f8
3 changes: 2 additions & 1 deletion src/jvmMain/kotlin/Server.kt
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ fun main() {
json()
}
install(CORS) {
allowHeader(HttpHeaders.ContentType)
allowMethod(HttpMethod.Get)
allowMethod(HttpMethod.Post)
allowMethod(HttpMethod.Delete)
Expand Down Expand Up @@ -65,4 +66,4 @@ fun main() {
}
}
}.start(wait = true)
}
}