|
|
@@ -6,9 +6,9 @@
|
|
|
|
|
|
import Foundation
|
|
|
|
|
|
-class HttpHandlers {
|
|
|
+public class HttpHandlers {
|
|
|
|
|
|
- class func directory(dir: String) -> ( HttpRequest -> HttpResponse ) {
|
|
|
+ public class func directory(dir: String) -> ( HttpRequest -> HttpResponse ) {
|
|
|
return { request in
|
|
|
if let localPath = request.capturedUrlGroups.first {
|
|
|
let filesPath = dir.stringByExpandingTildeInPath.stringByAppendingPathComponent(localPath)
|
|
|
@@ -20,7 +20,7 @@ class HttpHandlers {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- class func directoryBrowser(dir: String) -> ( HttpRequest -> HttpResponse ) {
|
|
|
+ public class func directoryBrowser(dir: String) -> ( HttpRequest -> HttpResponse ) {
|
|
|
return { request in
|
|
|
if let pathFromUrl = request.capturedUrlGroups.first {
|
|
|
let filePath = dir.stringByExpandingTildeInPath.stringByAppendingPathComponent(pathFromUrl)
|