Permalink
Browse files

Run Clojars in auto-reload mode from the console and document it.

  • Loading branch information...
1 parent afa096b commit a05c3c9351978244fbd4a4db39d73a016ab4add8 @pupeno pupeno committed Aug 2, 2011
Showing with 24 additions and 7 deletions.
  1. +21 −6 README.md
  2. +3 −1 project.clj
View
27 README.md
@@ -12,22 +12,37 @@ to try to run your own copy (for example inside a company).
Running the webapp
------------------
-1. Install [Leiningen](http://github.com/technomancy/leiningen) and
-[SQLite3](http://www.sqlite.org/)
-(Debian: `apt-get install sqlite3`).
+There are several ways to run Clojars depending on what you intend to do with
+it. Regardless of how you run it, you first need to do some setup:
-2. Compile with: `lein uberjar`
+1. Install [Leiningen](http://github.com/technomancy/leiningen)
+ * Mac OS X Homebrwe: `brew install leiningen`
+
+2. Install [SQLite3](http://www.sqlite.org/)
+ * Debian: `apt-get install sqlite3`
+ * Mac OS X Homebrew: `brew install sqlite`
3. Create an initial sqlite database: `mkdir data; sqlite3 data/db < clojars.sql`
-4. Run the webapp: `java -jar clojars-web-*-standalone.jar 8080 8701`
+To run the application as standlone from the console:
+
+1. Compile with: `lein uberjar`
+
+2. Run the webapp: `java -jar clojars-web-*-standalone.jar 8080 8701`
+
+3. Now try hitting [localhost:8080](http://localhost:8080) in your web browser.
-5. Now try hitting `http://localhost:8080/` in your web browser.
+To run the application in auto-reload mode, from the console:
+
+1. Run `lein ring server`
+
+and that's it, it should automatically open a browser in [localhost:3000](http://localhost:3000).
If you'd like to run it out of an editor/IDE environment you can
probably eval a call to the `-main` function in
`src/clojars/core.clj`.
+
Test data
---------
View
4 project.clj
@@ -10,5 +10,7 @@
[ring/ring-jetty-adapter "0.3.1"]
[hiccup "0.3.0"]
[org.clojars.ato/nailgun "0.7.1"]
- [org.xerial/sqlite-jdbc "3.6.17"]])
+ [org.xerial/sqlite-jdbc "3.6.17"]]
+ :dev-dependencies [[lein-ring "0.4.5"]]
+ :ring {:handler clojars.web/clojars-app})

0 comments on commit a05c3c9

Please sign in to comment.