comparison webtty.js @ 137:f14e92f6d955

webtty: don't hardcode paths.
author John "Elwin" Edwards
date Thu, 18 Jul 2013 10:36:58 -0700
parents ad4229cf8321
children 789c094675f4
comparison
equal deleted inserted replaced
136:56da59b343ca 137:f14e92f6d955
1 #!/usr/bin/env node 1 #!/usr/bin/env node
2
3 var localModules = '/usr/lib/node_modules/';
2 var http = require('http'); 4 var http = require('http');
3 var url = require('url'); 5 var url = require('url');
4 var path = require('path'); 6 var path = require('path');
5 var fs = require('fs'); 7 var fs = require('fs');
6 var pty = require("/usr/local/lib/node_modules/pty.js"); 8 var pty = require(path.join(localModules, "pty.js"));
7 9
8 var serveStaticRoot = "/home/elwin/hk/nodejs/rlg/s/"; 10 var serveStaticRoot = fs.realpathSync(".");
9 var ptyhelp = "/home/elwin/hk/nodejs/rlg/ptyhelper";
10 var sessions = {}; 11 var sessions = {};
11 12
12 var env_dontuse = {"TMUX": true, "TMUX_PANE": true}; 13 var env_dontuse = {"TMUX": true, "TMUX_PANE": true};
13 14
14 /* Constructor for TermSessions. Note that it opens the terminal and 15 /* Constructor for TermSessions. Note that it opens the terminal and