Mike Gerwitz

Activist for User Freedom

aboutsummaryrefslogtreecommitdiffstats
path: root/conf
diff options
context:
space:
mode:
authorMike Gerwitz <gerwitzm@lovullo.com>2017-08-28 12:37:46 -0400
committerMike Gerwitz <gerwitzm@lovullo.com>2017-08-29 14:56:10 -0400
commit985819c31ba8151be9f572a955b8e6e31432911e (patch)
treedf67b3c55ae90c8325c3ba8df1a623be7e9ed056 /conf
parent464a46abf04efb75c5ee0bb0b25a613961787944 (diff)
downloadliza-985819c31ba8151be9f572a955b8e6e31432911e.tar.gz
liza-985819c31ba8151be9f572a955b8e6e31432911e.tar.bz2
liza-985819c31ba8151be9f572a955b8e6e31432911e.zip
[BC BREAK] bin/server.js and associated changes
This is based (very) loosely on an internal script to start the daemon. It accepts a configuration and starts the daemon. To accommodate the configuration, a number of miscellaneous changes have been made. The vanilla configuration shows the concept, but it has not yet been fully implemented; that'll likely happen at a later date. Until then, the existing environment-variable-based configuration will be used. * bin/server.js: Add file. * conf/vanilla-server.json: Example configuration added. * src/server/daemon/Daemon.js (_httpPort): Remove field. (_conf): Add field. (__construct): [BC BREAK] Accept conf instead of port and log priority. Move initialization code into `start'. (start): [BC BREAK] Initialization code moved here. Now returns promise for entire daemon, which will error in the event of an error starting. Move existing code into `_startDaemon'. (_startDaemon): Old `start' code. Invoked after `start' initialization. (_createDebugLog, _createAccessLog): Use configuration. Return promise. (_initHttpServer): Use configuration. (_httpError): Add function to output error and exit. Extracted from `_initHttpServer'. * src/server/daemon/scripts.js: [BC BREAK] Append "program/" to `LV_LEGACY_PATH' so that it can be re-used for script lookups rather than using the cwd. This removes the need of the cwd being the legacy src path.
Diffstat (limited to 'conf')
-rw-r--r--conf/vanilla-server.json55
1 files changed, 55 insertions, 0 deletions
diff --git a/conf/vanilla-server.json b/conf/vanilla-server.json
new file mode 100644
index 0000000..e056466
--- /dev/null
+++ b/conf/vanilla-server.json
@@ -0,0 +1,55 @@
+{
+ "name": "Liza Server",
+ "daemon": "DevDaemon",
+
+ "http": {
+ "port": 8822
+ },
+
+ "log": {
+ "priority": 10,
+ "access": {
+ "path": "/var/log/node/access.log"
+ },
+ "debug": {
+ "path": "/var/log/node/debug.log"
+ }
+ },
+
+ "user": {
+ "session": {
+ "handler": {
+ "type": "php",
+ "cookie": "PHPSESSID"
+ },
+ "store": {
+ "type": "memcache",
+ "host": "localhost",
+ "port": 11211
+ }
+ }
+ },
+
+ "documentStore": {
+ "store": "mongodb",
+ "host": "localhost",
+ "port": 27017
+ },
+
+ "services": {
+ "rating": {
+ "process": {
+ "port": 5859,
+ "argv": "inherit"
+ },
+ "remote": {
+ "host": "localhost",
+ "domain": ""
+ }
+ },
+ "c1export": {
+ "host": "localhost",
+ "domain": ""
+ }
+ }
+}