     ;; (println "Using project" project)
     ;; asynchronously check for updates
     ;; (version/check-for-update version)
-    (let [s (sys/start (merge runtime-config
-                              {:routes          routes
-                               :nrepl-port      nrepl-requested-port
-                               :nrepl-host      (:nrepl-host conf)
-                               :nrepl-port-file (io/file (or (:nrepl-port-file conf) ".nrepl-port"))
-                               :server-port     webapp-requested-port
-                               ;; TODO bringing the websockets in is a little dirty for now
-                               :jetty-options   {:websockets {"/repl" (ws-relay/ws-processor route/nrepl-handler)}}
-                               :ip              ip}))
+    (let [s (sys/start merged-config)
           server (-> s (get-in [:server :jetty]))
           webapp-port (-> server .getConnectors (get 0) .getLocalPort)
           ;; webapp-port (-> s (get-in [:server :httpkit]) .getPort)

        routes (if nrepl-host
                 "pinkgorilla.route/remote-repl-handler"
                 "pinkgorilla.route/default-handler")
        gorilla-port-file (io/file (or (:gorilla-port-file conf) ".gorilla-port"))
        ;; project (or (:project conf) {})
        ;; keymap (or (:keymap (:gorilla-options conf)) {})

(defn run-gorilla-server
  [conf]
  (info "Got conf " conf)
  (let [version (or (:version conf) "develop")
        webapp-requested-port (or (:port conf) 0)
        ip (or (:ip conf) "127.0.0.1")
        nrepl-requested-port (or (:nrepl-port conf) 0)      ;; auto-select port if none requested
