Skip to content

Instantly share code, notes, and snippets.

@christianberg
Created June 9, 2010 15:37
Show Gist options
  • Save christianberg/431661 to your computer and use it in GitHub Desktop.
Save christianberg/431661 to your computer and use it in GitHub Desktop.
(defn start-server [app]
"Initializes the App Engine services and (re-)starts a Jetty server
running the supplied ring app, wrapping it to enable App Engine API use
and serving of static files."
(set-app-engine-delegate "/tmp")
(swap! *server* (fn [instance]
(when instance
(.stop instance))
(let [app (-> (routes login-routes app)
(wrap-local-app-engine)
(wrap-file "./war")
(wrap-file-info))]
(run-jetty app {:port *port*
:join? false})))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment