GCDWebServer static website on Swift
问题 I'm trying to make GCDWebServer show static content. I have code import UIKit import Foundation class ViewController: UIViewController { var webServer:GCDWebServer? let urlpath = NSBundle.mainBundle().pathForResource("index", ofType: "html", inDirectory: "www") override func viewDidLoad() { super.viewDidLoad() initWebServer() } func initWebServer() { webServer = GCDWebServer() webServer!.addGETHandlerForBasePath("/", directoryPath: urlpath, indexFilename: "index.html", cacheAge: 3600,