X-Git-Url: https://git.sesse.net/?p=remoteglot;a=blobdiff_plain;f=www%2Fserve-analysis.js;h=9bb33cfd28340d29dc7ae7e871db8b99bd148782;hp=d69c23a7dd2135e43062c710589202319fd432ee;hb=a0290e9de747b7811e8403b6e7ea80ba5d96cd71;hpb=6f7ddebb2dd0756615d36ae6d11388e67abdfdad diff --git a/www/serve-analysis.js b/www/serve-analysis.js index d69c23a..9bb33cf 100644 --- a/www/serve-analysis.js +++ b/www/serve-analysis.js @@ -20,10 +20,16 @@ if (process.argv.length >= 3) { json_filename = process.argv[2]; } +// Expected destination filename. +var serve_url = '/analysis.pl'; +if (process.argv.length >= 4) { + serve_url = process.argv[3]; +} + // TCP port to listen on. var port = 5000; -if (process.argv.length >= 4) { - port = parseInt(process.argv[3]); +if (process.argv.length >= 5) { + port = parseInt(process.argv[4]); } // If set to 1, we are already processing a JSON update and should not @@ -264,7 +270,7 @@ server.on('request', function(request, response) { handle_viewer_override(request, u, response); return; } - if (u.pathname !== '/analysis.pl') { + if (u.pathname !== serve_url) { // This is not the request you are looking for. send_404(response); return;