]> git.sesse.net Git - remoteglot/commitdiff
Move the Node.js stuff out of the public www directory.
authorSteinar H. Gunderson <sgunderson@bigfoot.com>
Tue, 22 Mar 2016 00:12:40 +0000 (01:12 +0100)
committerSteinar H. Gunderson <sgunderson@bigfoot.com>
Tue, 22 Mar 2016 00:12:40 +0000 (01:12 +0100)
server/hash-lookup.js [moved from www/js/hash-lookup.js with 98% similarity]
server/hashprobe.proto [moved from www/js/hashprobe.proto with 100% similarity]
server/serve-analysis.js [moved from www/serve-analysis.js with 98% similarity]

similarity index 98%
rename from www/js/hash-lookup.js
rename to server/hash-lookup.js
index 654a3f9b9202ea9a1e16b2c324a77fc7a72f68d4..13f97582e51dd18f3bb562582218ecea7bdeb79c 100644 (file)
@@ -1,5 +1,5 @@
 var grpc = require('grpc');
-var Chess = require(__dirname + '/chess.min.js').Chess;
+var Chess = require('../www/js/chess.min.js').Chess;
 
 var PROTO_PATH = __dirname + '/hashprobe.proto';
 var hashprobe_proto = grpc.load(PROTO_PATH).hashprobe;
similarity index 98%
rename from www/serve-analysis.js
rename to server/serve-analysis.js
index d59941f42559c56c9440a6babd269a50b6749139..0490e96f604a2639102aa62cc572320208b23fe7 100644 (file)
@@ -10,8 +10,8 @@ var path = require('path');
 var zlib = require('zlib');
 var readline = require('readline');
 var child_process = require('child_process');
-var delta = require('./js/json_delta.js');
-var hash_lookup = require('./js/hash-lookup.js');
+var delta = require('../www/js/json_delta.js');
+var hash_lookup = require('./hash-lookup.js');
 
 // Constants.
 var HISTORY_TO_KEEP = 5;
@@ -36,8 +36,8 @@ if (process.argv.length >= 5) {
 
 // TCP port to listen on.
 var port = 5000;
-if (process.argv.length >= 5) {
-       port = parseInt(process.argv[4]);
+if (process.argv.length >= 6) {
+       port = parseInt(process.argv[5]);
 }
 
 // If set to 1, we are already processing a JSON update and should not