Skip to content

Instantly share code, notes, and snippets.

@dakrone
Created April 20, 2010 20:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dakrone/373003 to your computer and use it in GitHub Desktop.
Save dakrone/373003 to your computer and use it in GitHub Desktop.
(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