annotate configuration.js.example @ 11:1cb2279e3f30

Improve the README.
author Bruno Michel <bmichel@menfin.info>
date Thu, 02 Jun 2011 00:10:06 +0200
parents a637cde69f71
children 38ddd5888b8d
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
d5cfe54f11aa Initial commit.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff changeset
1 /*
d5cfe54f11aa Initial commit.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff changeset
2 * Copyright (C) 2011 Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
d5cfe54f11aa Initial commit.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff changeset
3 *
d5cfe54f11aa Initial commit.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff changeset
4 * This file is the source code of an XMPP avatar retriever.
d5cfe54f11aa Initial commit.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff changeset
5 *
d5cfe54f11aa Initial commit.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff changeset
6 * This program is free software: you can redistribute it and/or modify
d5cfe54f11aa Initial commit.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff changeset
7 * it under the terms of the GNU Affero General Public License as
d5cfe54f11aa Initial commit.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff changeset
8 * published by the Free Software Foundation, version 3 of the License.
d5cfe54f11aa Initial commit.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff changeset
9 *
d5cfe54f11aa Initial commit.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff changeset
10 * This program is distributed in the hope that it will be useful,
d5cfe54f11aa Initial commit.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff changeset
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
d5cfe54f11aa Initial commit.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff changeset
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
d5cfe54f11aa Initial commit.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff changeset
13 * GNU Affero General Public License for more details.
d5cfe54f11aa Initial commit.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff changeset
14 *
d5cfe54f11aa Initial commit.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff changeset
15 * You should have received a copy of the GNU Affero General Public License
d5cfe54f11aa Initial commit.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff changeset
16 * along with this program. If not, see <http://www.gnu.org/licenses/>.
d5cfe54f11aa Initial commit.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff changeset
17 */
d5cfe54f11aa Initial commit.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff changeset
18
d5cfe54f11aa Initial commit.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff changeset
19 'use strict';
d5cfe54f11aa Initial commit.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff changeset
20
d5cfe54f11aa Initial commit.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff changeset
21 var config = exports;
d5cfe54f11aa Initial commit.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff changeset
22
8
e0cd5ede76af Better documentation.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents: 7
diff changeset
23 // The JID and password of the component, that have to be configured in
e0cd5ede76af Better documentation.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents: 7
diff changeset
24 // the host.
0
d5cfe54f11aa Initial commit.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff changeset
25 config.jid = 'avatar.example.org';
8
e0cd5ede76af Better documentation.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents: 7
diff changeset
26 config.password = 'hellohello';
e0cd5ede76af Better documentation.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents: 7
diff changeset
27
e0cd5ede76af Better documentation.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents: 7
diff changeset
28 // The hostname or IP address and the port of the XMPP server hosting
e0cd5ede76af Better documentation.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents: 7
diff changeset
29 // the component.
4
8acaa0a575c7 Allow configuration of the host.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents: 0
diff changeset
30 config.host = 'localhost';
8acaa0a575c7 Allow configuration of the host.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents: 0
diff changeset
31 config.port = 5347;
7
51cda3a6e1c3 Better handling of proxy connections; add an option to specify the root on the webserver.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents: 5
diff changeset
32
8
e0cd5ede76af Better documentation.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents: 7
diff changeset
33 // Root of the webservice, useful if you want to proxy it.
7
51cda3a6e1c3 Better handling of proxy connections; add an option to specify the root on the webserver.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents: 5
diff changeset
34 config.webRoot = '^/avatar/';
8
e0cd5ede76af Better documentation.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents: 7
diff changeset
35
9
9360b78c7a5b Add WebHost configuration, and default it to both IPv6 and IPv4.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents: 8
diff changeset
36 // These are the host and the port on which the web service will
9360b78c7a5b Add WebHost configuration, and default it to both IPv6 and IPv4.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents: 8
diff changeset
37 // listen. If you want IPv4 connection only, instead of both IPv4 and
9360b78c7a5b Add WebHost configuration, and default it to both IPv6 and IPv4.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents: 8
diff changeset
38 // IPv6, replace '::' by '0.0.0.0'. If you want a port < 1024, you
9360b78c7a5b Add WebHost configuration, and default it to both IPv6 and IPv4.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents: 8
diff changeset
39 // have to start it as root, use a proxy or redirect it using a
9360b78c7a5b Add WebHost configuration, and default it to both IPv6 and IPv4.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents: 8
diff changeset
40 // firewall like iptables.
9360b78c7a5b Add WebHost configuration, and default it to both IPv6 and IPv4.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents: 8
diff changeset
41 config.webHost = '::';
8
e0cd5ede76af Better documentation.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents: 7
diff changeset
42 config.webPort = 8032;
e0cd5ede76af Better documentation.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents: 7
diff changeset
43
e0cd5ede76af Better documentation.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents: 7
diff changeset
44 // Directory for the cache of the images.
e0cd5ede76af Better documentation.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents: 7
diff changeset
45 config.directory = 'data';
e0cd5ede76af Better documentation.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents: 7
diff changeset
46
e0cd5ede76af Better documentation.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents: 7
diff changeset
47 // When true, assume that the TYPE of the avatar is image/png if not
e0cd5ede76af Better documentation.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents: 7
diff changeset
48 // specified. Warning: it doesn’t follow the spec and is only a
e0cd5ede76af Better documentation.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents: 7
diff changeset
49 // workaround for buggy clients.
e0cd5ede76af Better documentation.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents: 7
diff changeset
50 config.guessType = false;