Source for LibroIpsum public API. Powers LibroIpsum.com. Supports .txt
, .json
, .jsonp
, and .xml
content-type rendering.
Example API requests: Cicero, Plato's Republic, Obama-Romney Debates (2012), Huckleberry Finn
To use the source locally, you must first have Node.js installed (installer). Then, in your terminal, clone the repository and install dependencies:
git clone git://github.com/aduth/api.libroipsum.com.git
cd api.libroipsum.com
npm install
Start the server with Node.js:
node index.js
To make use of the API, there must be source texts available in the sources/
directory. These sources are automatically loaded and seeded (cached) by the server. For example, if sources/books/example.txt
exists, generated LibroIpsum text can be accessed at http://localhost:8080/books/example.json
.
To make changes, modify .coffee
source files in the src/
directory. A Gruntfile exists to easily watch and compile CoffeeScript to JavaScript:
npm install -g grunt-cli # If not already installed
grunt
Copyright (c) 2013 Andrew Duthie
Released under the MIT License (see LICENSE.txt)