Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Support for 'lein ring server' #105

Merged
merged 2 commits into from

3 participants

@srid

Unlike lein run - lein ring server automatically reloads modified files.

Without this, lein ring server is broken,
https://gist.github.com/1218505


More on what 'ring server' (from lein-ring) actually does:

The following command will start a development web server, and opens a
web browser to the root page:

lein ring server

The server monitors your source directory for file modifications, so any
altered files will automatically be reloaded.

By default, this command attempts to find a free port, starting at
3000, but you can specify your own port as an argument:

lein ring server 4000

The server-headless command works like the server command, except that
it doesn't open a web browser:

lein ring server-headless

lein ring server-headless 4000
srid added some commits
@srid srid Support for 'lein ring server'
Unlike 'lein run' - 'ring server' automatically recompiles changed
files.

Without this, 'ring server' is broken,
https://gist.github.com/1218505
ca4be12
@srid srid 'lein run' is not necessary anymore; and 'lein ring server' opens web
browser automatically
faf1236
@gigasquid
Collaborator

Nice! Thank you.

@amalloy amalloy merged commit 28abd2b into 4clojure:develop
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Sep 15, 2011
  1. @srid

    Support for 'lein ring server'

    srid authored
    Unlike 'lein run' - 'ring server' automatically recompiles changed
    files.
    
    Without this, 'ring server' is broken,
    https://gist.github.com/1218505
  2. @srid
This page is out of date. Refresh to see the latest.
Showing with 4 additions and 4 deletions.
  1. +1 −2  README.md
  2. +3 −2 project.clj
View
3  README.md
@@ -32,9 +32,8 @@ vaguely like this:
* For the first time use, you will need to load the problem data. Run the script `load-data.sh`:
./load-data.sh
-* Run `lein run` and then open the brower to http://localhost:8080/
- lein run
+* Run `lein ring server`
## Contributors
View
5 project.clj
@@ -16,8 +16,9 @@
[incanter/incanter-core "1.2.3"]
[incanter/incanter-charts "1.2.3"]
[org.apache.commons/commons-email "1.2"]]
- :dev-dependencies [[lein-ring "0.4.0"]
+ :dev-dependencies [[lein-ring "0.4.5"]
[swank-clojure "1.2.1"]
[midje "1.1.1"]]
:main foreclojure.core
- :ring {:handler foreclojure.core/app})
+ :ring {:handler foreclojure.core/app
+ :init foreclojure.mongo/prepare-mongo})
Something went wrong with that request. Please try again.