changeset 137:f14e92f6d955

webtty: don't hardcode paths.
author John "Elwin" Edwards
date Thu, 18 Jul 2013 10:36:58 -0700
parents 56da59b343ca
children 144595e50376
files webtty.js
diffstat 1 files changed, 4 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/webtty.js	Wed Sep 12 17:34:27 2012 -0700
+++ b/webtty.js	Thu Jul 18 10:36:58 2013 -0700
@@ -1,12 +1,13 @@
 #!/usr/bin/env node
+
+var localModules = '/usr/lib/node_modules/';
 var http = require('http');
 var url = require('url');
 var path = require('path');
 var fs = require('fs');
-var pty = require("/usr/local/lib/node_modules/pty.js");
+var pty = require(path.join(localModules, "pty.js"));
 
-var serveStaticRoot = "/home/elwin/hk/nodejs/rlg/s/";
-var ptyhelp = "/home/elwin/hk/nodejs/rlg/ptyhelper";
+var serveStaticRoot = fs.realpathSync(".");
 var sessions = {};
 
 var env_dontuse = {"TMUX": true, "TMUX_PANE": true};