Created
December 12, 2012 22:14
-
-
Save marshallshen/4272133 to your computer and use it in GitHub Desktop.
deploy incanter app through Lein
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# assume that we have Leiningen installed | |
mkdir project_name | |
mkdir project_name/src | |
# create project.clj | |
(defproject incanter-helloworld "0.1.0" | |
:description "The Incanter version of hello world." | |
:dependencies [[incanter "1.2.3-SNAPSHOT"]] | |
:main hello) | |
# "main hello" indicates that the main file is named hello. | |
# create hello.clj | |
(ns hello | |
(:gen-class) | |
(:use (incanter core stats charts))) | |
(defn -main [& args] | |
(view (histogram (sample-normal 1000)))) | |
# Source: http://data-sorcery.org/2009/11/20/leiningen-clojars/ | |
user=> (use '(incanter core stats charts)) | |
user=> (view (histogram (sample-normal 1000))) | |
$ java -cp 'lib/*' clojure.main | |
# add clo-jars | |
lein plugin install lein-clojars 0.9.1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment