diff configuration.js @ 8:e0cd5ede76af

Better documentation.
author Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
date Thu, 19 May 2011 20:52:34 +0200
parents 51cda3a6e1c3
children 9360b78c7a5b
line wrap: on
line diff
--- a/configuration.js
+++ b/configuration.js
@@ -20,11 +20,28 @@
 
 var config = exports;
 
+// The JID and password of the component, that have to be configured in
+// the host.
 config.jid = 'avatar.example.org';
+config.password = 'hellohello';
+
+// The hostname or IP address and the port of the XMPP server hosting
+// the component.
 config.host = 'localhost';
 config.port = 5347;
-config.password = 'hellohello';
 
+// Root of the webservice, useful if you want to proxy it.
 config.webRoot = '^/avatar/';
-config.directory = 'data'; // Directory of the cache.
-config.guessType = false; // When true, assume that the TYPE of the avatar is image/png if not specified.
+
+// It is the port on which the web service will listen.  If you want a
+// port < 1024, you have to start it as root, use a proxy or redirect
+// it using a firewall like iptables.
+config.webPort = 8032;
+
+// Directory for the cache of the images.
+config.directory = 'data';
+
+// When true, assume that the TYPE of the avatar is image/png if not
+// specified.  Warning: it doesn’t follow the spec and is only a
+// workaround for buggy clients.
+config.guessType = false;