Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.

node-b, currently jutting down ideas


This is a node.js RESTful application written in JavaScript, does not require compiling, and it is 100% MIT licensed. The application follows the book "Web API Design" by Brian Mulloy.

It retrieves bible content. More of an exercise than a real app, but hopefully functional as well.

The data is retrieved from a MySQL database, using node-mysql. The data is not being entirely computed with each call, we rather build the result sets at application startup, cache them, and then return them based on the incoming requests. The output format is JSON or XML. The user has the ability to control the result format.

Usage examples:

  • GET /bible: Will return all the books in the bible by name, and the number of chapters in each book.
  • GET /<book-name>: Will return the number of all chapters in the book and the number of verses in each chapter.
  • GET /<book-name>/<chapter-no.>: Will return all the verses in the chapter, and the corresponding footnotes of each verse. Footnote retrieval is enabled by default but controllable through additional parameters.

Additional parameters behind the "?"

  • GET /<book-name>/<chapter-no.>?limit=3&offset=5&fn=0: Will return the verses in the chapter, starting from verse 3 to verse 5 inclusive, and no footnotes.

Metadata will be provided indicating the number of records, pagination, offset...


For the same resource, the returned response format must be specified in the header:

  • GET /bible, Content-Type: application/json

  • GET /bible, Content-Type: application/xml

Error handling

  • 200 OK
  • 400 Bad request
  • 500 Internal server error

The message will be as verbose as possible: {TODO msg, metadata, examples of returned data}

Something went wrong with that request. Please try again.