Mercurial > hg > rlgwebd
comparison rlgwebd.js @ 141:1a156a7746a7
RLGWebD: use NODE_PATH to find modules.
author | John "Elwin" Edwards |
---|---|
date | Wed, 14 Aug 2013 08:04:36 -0700 |
parents | dcd07c1d846a |
children | c4304f08e35b |
comparison
equal
deleted
inserted
replaced
140:789c094675f4 | 141:1a156a7746a7 |
---|---|
1 #!/usr/bin/env node | 1 #!/usr/bin/env node |
2 | 2 |
3 // If you can't quite trust node to find it on its own | |
4 var localModules = '/usr/local/lib/node_modules/'; | |
5 var http = require('http'); | 3 var http = require('http'); |
6 var net = require('net'); | 4 var net = require('net'); |
7 var url = require('url'); | 5 var url = require('url'); |
8 var path = require('path'); | 6 var path = require('path'); |
9 var fs = require('fs'); | 7 var fs = require('fs'); |
10 var events = require('events'); | 8 var events = require('events'); |
11 var child_process = require('child_process'); | 9 var child_process = require('child_process'); |
12 var posix = require(path.join(localModules, "posix")); | 10 // Dependencies |
13 var pty = require(path.join(localModules, "pty.js")); | 11 var posix = require("posix"); |
14 var WebSocketServer = require(path.join(localModules, "websocket")).server; | 12 var pty = require("pty.js"); |
13 var WebSocketServer = require("websocket").server; | |
15 | 14 |
16 /* Configuration variables */ | 15 /* Configuration variables */ |
17 // The first file is NOT in the chroot. | 16 // The first file is NOT in the chroot. |
18 var ctlsocket = "/var/local/rlgwebd/ctl"; | 17 var ctlsocket = "/var/local/rlgwebd/ctl"; |
19 var httpPort = 8080; | 18 var httpPort = 8080; |