Nuthatch Web Publishing App

created May 31, 2018

Yet another web publishing app.

This one will be written in Lua, like Sora, but Nuthatch will function similar to Scaup and Veery.

It will store content in the CouchDB NoSQL database, and it will rely on Elasticsearch for searching.

Pages will cached in Memcached. I never recompiled the Nginx web server to include the Redis module. A few years ago, the Memcached module was included in the default install of Nginx. I'm only using key=value for caching, which is about all that Memcached can do.



May 31, 2018: Within my Digital Ocean account, I modified my Soupmode server's DNS. I added a CNAME record for


May 31, 2018: I created a test development database for Nuthatch.

May 31, 2018: I created an author called "NutHatch".

May 31, 2018: Installed the Lua module for CouchDB. luarocks install luchia. The module requires lualogging which got installed automatically when installing luchia. The luchia module also required lua-cjson, which I already had installed.

Compatible with Lua 5.1, 5.2, 5.3

100% unit test coverage


My old post about using CouchDB, including curl commands.


May 31, 2018: I executed the script which is self-explanatory.


As of May 31, 2018:

Nuthatch /
  couchdb /
  elasticsearch /


in couchdb directory, need to create create-views.lua and update-views.lua.

need to exploit the dsl capabilities in elasticsearch for advance searches. requires sending json in a post request to conduct a search.

Jun 20, 2018

Created an Nginx config file. Enabled the beginnings of the API code work through http.

June 29, 2018

-g in curl disables globbing and permits the uri to use brackets.

original url =

<a href=";limit=16&amp;skip=0&amp;startkey=">;limit=16&amp;skip=0&amp;startkey=</a>["wiki", {}]&amp;endkey=["wiki"]

but parts need encoded, apparently.

curl -g ';limit=16&amp;skip=0&amp;startkey=[%22wiki%22,%20%7B%7D]&amp;endkey=[%22wiki%22]'

need a lua version of this:

July 10, 2018

Search string: "My Web Apps as of August 2015"

Surrounding the string with double quotes makes the search an exact match on the string. Otherwise, posts that contain one or more of the words in the string will be returned too with the most relevant results displayed first.

curl ';q=%2Btype%3Apost+%2Bpost_status%3Apublic+%2Bmarkup%3A%22My+Web+Apps+as+of+August+2015%22&amp;from=0'