swifter icon indicating copy to clipboard operation
swifter copied to clipboard

html loading issue

Open zubryan opened this issue 4 years ago • 1 comments

I tried to load local html as follow:

        let path = Bundle.main.resourcePath! 
        let server = HttpServer()
        server["/:path"] = directoryBrowser(path)
        
        do {
            try server.start(9080, forceIPv4: true)
            print("Server has started ( port = \(try server.port()) ). Try to connect now...")
        } catch {
            print("Server start error: \(error)")
        }

When I visit http://localhost:9080/index.html, it shows some error as follow. The page loading is ok, but no content showing, maybe it's the problem with resource like css and js? And when I start a simple http server like 'python -m SimpleHTTPServer', it's working perfectly.

image

zubryan avatar Aug 05 '19 09:08 zubryan

I am experiencing the same issue using shareFilesFromDirectory()

nickhodaly avatar Nov 18 '20 00:11 nickhodaly