Demonstration project for a Clojure web tutorial.
Inspired by Dan Benjamin's Meet Sinatra screencast.
Initial project was generated by:
lein new compojure adserver
Before running the server for the first time, load some test fixtures and create an admin user:
lein repl
user=> (require '[adserver.handler :as h] '[adserver.db :as db])
user=> (h/init)
user=> (db/load-fixtures h/data-source)
user=> (db/create-user! h/data-source {:user-name "admin" :password "very secret" :roles ["admin"]})
user=> (h/destroy)
user=> (quit)
To run the server:
lein ring server
Once the server is running, navigate to http://localhost:3000/demo.html for a demonstration of the embedded ads, or to http://localhost:3000/ to login to the admin interface.
Copyright © 2015 Ray Miller [email protected]
Distributed under the Eclipse Public License either version 1.0 or (at your option) any later version.