You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Im trying to make an app that embed web app code.
I have added in my project source 2 folders:
One for the app
One for the authentication process
Im trying to start a server to execute my authentication app first. let server = HttpServer() do { try server.start() let bundlePath = Bundle.main.bundlePath var frontEndAuthPath = bundlePath frontEndAuthPath.append("/frontend-auth/") server["/auth"] = shareFilesFromDirectory(frontEndAuthPath) server["/auth/static/"] = shareFilesFromDirectory(frontEndAuthPath.appending("static/")) server["/auth/static/js"] = shareFilesFromDirectory(frontEndAuthPath.appending("static/js")) server["/auth/static/css"] = shareFilesFromDirectory(frontEndAuthPath.appending("static/css")) server["/auth/static/media"] = shareFilesFromDirectory(frontEndAuthPath.appending("static/media")) print("Server has started ( port = \(try server.port()) ). Try to connect now...") } catch (let error) { print(error.localizedDescription) }
My problem is that the web app is not started because it not found static/js/files
I saw different methods : shareFilesFromDirectory or directoryBrowser.
How can I run correctly my server ?
The text was updated successfully, but these errors were encountered:
Hello 👋
Im trying to make an app that embed web app code.
I have added in my project source 2 folders:
Im trying to start a server to execute my authentication app first.
let server = HttpServer() do { try server.start() let bundlePath = Bundle.main.bundlePath var frontEndAuthPath = bundlePath frontEndAuthPath.append("/frontend-auth/") server["/auth"] = shareFilesFromDirectory(frontEndAuthPath) server["/auth/static/"] = shareFilesFromDirectory(frontEndAuthPath.appending("static/")) server["/auth/static/js"] = shareFilesFromDirectory(frontEndAuthPath.appending("static/js")) server["/auth/static/css"] = shareFilesFromDirectory(frontEndAuthPath.appending("static/css")) server["/auth/static/media"] = shareFilesFromDirectory(frontEndAuthPath.appending("static/media")) print("Server has started ( port = \(try server.port()) ). Try to connect now...") } catch (let error) { print(error.localizedDescription) }
My problem is that the web app is not started because it not found static/js/files
I saw different methods :
shareFilesFromDirectory
ordirectoryBrowser
.How can I run correctly my server ?
The text was updated successfully, but these errors were encountered: