Created
April 20, 2010 20:14
-
-
Save dakrone/373003 to your computer and use it in GitHub Desktop.
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
(ns web-tag.core | |
(:require [opennlp.nlp :as nlp]) | |
(:use [compojure.core] | |
[ring.adapter.jetty])) | |
(defn parse-page | |
[url] | |
(println (str "url is " url)) ; printing nil for some reason | |
(str "<h1>parsing: " url "</h1>")) | |
(defroutes main | |
(GET "/" [] "Hello World") | |
(GET "/parse/:url" [url] (parse-page url))) | |
(run-jetty main {:port 8080}) | |
;Clojure 1.1.0 | |
;user=> (use 'web-tag.core) | |
;2010-04-20 14:14:08.786::INFO: Logging to STDERR via org.mortbay.log.StdErrLog | |
;2010-04-20 14:14:08.787::INFO: jetty-6.1.14 | |
;2010-04-20 14:14:08.810::INFO: Started SocketConnector@0.0.0.0:8080 | |
;url is |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment