From: Steinar H. Gunderson Date: Tue, 22 Mar 2016 00:12:40 +0000 (+0100) Subject: Move the Node.js stuff out of the public www directory. X-Git-Url: https://git.sesse.net/?p=remoteglot;a=commitdiff_plain;h=83aa0538ddb9037d37295f7e6e68348773661d7a;hp=fa63488e30a81f4370aa1e9a565b3d2331f553a6 Move the Node.js stuff out of the public www directory. --- diff --git a/www/js/hash-lookup.js b/server/hash-lookup.js similarity index 98% rename from www/js/hash-lookup.js rename to server/hash-lookup.js index 654a3f9..13f9758 100644 --- a/www/js/hash-lookup.js +++ b/server/hash-lookup.js @@ -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; diff --git a/www/js/hashprobe.proto b/server/hashprobe.proto similarity index 100% rename from www/js/hashprobe.proto rename to server/hashprobe.proto diff --git a/www/serve-analysis.js b/server/serve-analysis.js similarity index 98% rename from www/serve-analysis.js rename to server/serve-analysis.js index d59941f..0490e96 100644 --- a/www/serve-analysis.js +++ b/server/serve-analysis.js @@ -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