 		// Configuration data for another server which:
 		//	* Redirects all traffic back to the first server.
 		[
-			"name":"localhost",
-			"port":port2,
+			"name":PerfectTestServer.Name,
+			"port":PerfectTestServer.RedirectApiPort,
 			"routes":[
 				["method":"get", "uri":"/**", "handler":PerfectHTTPServer.HTTPHandler.redirect,
-				 "base":"http://localhost:\(port1)"]
+				 "base":"http://\(PerfectTestServer.Name):\(PerfectTestServer.PrimaryApiPort)"]
 			]
 		]
 	]

		//		directory (which must be located in the current working directory).
		//	* Performs content compression on outgoing data when appropriate.
		[
			"name":"localhost",
			"port":port1,
			"routes":[
				["method":"get", "uri":"/", "handler":handler],
				["method":"get", "uri":"/**", "handler":PerfectHTTPServer.HTTPHandler.staticFiles,

import PerfectHTTP
import PerfectHTTPServer

struct PerfectTestServer {
    static let Name = "localhost"
    static let PrimaryApiPort = 8080
    static let RedirectApiPort = 8181
}

// An example request handler.
// This 'handler' function can be referenced directly in the configuration below.
func handler(data: [String:Any]) throws -> RequestHandler {
	return {
		request, response in
		response.status = .ok
		response.setHeader(.contentType, value: "text/html")
		response.appendBody(string: "<html><title>Hello, world!</title><body>Hello, world!</body></html>")
		response.completed()
	}
}

let confData = [
	"servers": [
