https://kotlinlang.org logo
Title
d

d.medina

04/13/2022, 1:30 PM
im having an issue with single page application if i try to have it live any place but the root i get an error
routing() {
        singlePageApplication {
            applicationRoute = "/admin"
            useResources = true
            filesPath = "admin_app"
            }
}
when i try to set a route i get this
Admin_Dash_Compose.js:1          Failed to load resource: the server responded with a status of 404 (Not Found)
so i need to change my folder path to match or something? i tryed a few things but they didnt work out for me so far
a

Aleksei Tirman [JB]

04/13/2022, 3:21 PM
What request are you trying to make?
d

d.medina

04/13/2022, 5:56 PM
this should be serving a static html page with java script file to show my web app.... https://ktor.io/docs/serving-spa.html
a

Aleksei Tirman [JB]

04/13/2022, 5:59 PM
So you have the
admin_app
directory inside
resources
with
index.html
and other assets and when you access
/admin
in a browser it returns the 404 page?
d

d.medina

04/13/2022, 9:16 PM
if i go to dev tools the html file is there but the script is not found yes admin app is inside resources with index.html and the js file