From e4407f1b8402cb956aeab8e5f146cc56fac83189 Mon Sep 17 00:00:00 2001 From: "W. Trevor King" Date: Mon, 22 Sep 2014 06:12:33 -0700 Subject: [PATCH] README.rst: Add server-setup instructions It's no fun when projects don't tell you how to use them ;). --- README.rst | 48 +++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 45 insertions(+), 3 deletions(-) diff --git a/README.rst b/README.rst index b1deb22..ca2d24f 100644 --- a/README.rst +++ b/README.rst @@ -1,5 +1,47 @@ -Nmhive is a webserver for nmbug, allowing you to remotely query and -manage tags. There is also a bookmarklet that provides a convenient -interface for managing tags while browsing Gmane_. +Nmhive is a webserver for nmbug_, allowing you to remotely query and +manage notmuch_ tags. There is also a bookmarklet that provides a +convenient interface for managing tags while browsing Gmane_. +Dependencies +============ + +* Flask_ +* Flask-Cors_ + +The versions shouldn't matter too much, but I'm testing with Flask +0.10.1 and Flask-Cors 1.9.0. + +Server setup +============ + +Launch the server with something like:: + + $ nmhive.py -H 0.0.0.0 -p 5000 + * Running on http://0.0.0.0:5000/ + … + +You can kill the server whenever you like (e.g. via ``ctrl+c``) +without worrying about corrupting your local notmuch or nmbug +databases. + +Then edit ``nmbug_server`` in ``nmbug.js`` to point at that interface. +Serve ``nmbug.js`` and ``index.html`` somewhere. I serve them with +Nginx_, but you use whatever you like, including `Python's`__ +`http.server`_ with something like:: + + $ python -m http.server 8000 + +__ Python_ + +Point your users to the served ``index.html`` so they can get the +bookmarklet and read the instructions for using it. + + +.. _nmbug: http://notmuchmail.org/nmbug/ +.. _notmuch: http://notmuchmail.org/ .. _Gmane: http://gmane.org/ +.. _Flask: http://flask.pocoo.org/ +.. _Flask-Cors: https://pypi.python.org/pypi/Flask-Cors/ +.. _Nginx: http://nginx.org/ +.. _Python: https://www.python.org/ +.. _http.server: https://docs.python.org/3/library/http.server.html -- 2.26.2