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 654a3f9..13f9758 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 d59941f..0490e96 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