Database Reference
In-Depth Information
Running the server
Starting the server for development is a Leiningen task handled by the Ring plugin,
as shown here:
$ lein ring server
2013-01-16 09:01:47.630:INFO:oejs.Server:jetty-7.6.1.v20120215
Started server on port 3000
2013-01-16 09:01:47.687:INFO:oejs.AbstractConnector:Started
SelectChannelConnector@0.0.0.0:3000
This starts the server on port 3000 and opens a web browser to the home page of the site at
http://localhost:3000/ . In this case, that just redirects you to the census data, so your
browser should resemble the following screenshot, unless your browser attempts to download
JSON and save it to your drive (Although, your text editor should still be able to open it):
How it works…
The irst part of this system, and the foundation of it, is Ring ( https://github.com/
ring-clojure/ring ) . Ring is an abstraction over HTTP. This makes it easier to write web
applications that will work in a variety of settings and that run under a variety of servers. You
can write the web application to work with the Ring speciication, and you can connect Ring to
the web server using an adapter.
 
Search WWH ::




Custom Search