From 9e2b3dbaa58f3d3d2fd0eae67708bee7546f17c2 Mon Sep 17 00:00:00 2001 From: AJ ONeal Date: Fri, 7 Oct 2016 15:28:46 -0600 Subject: [PATCH] add version flag --- serve.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/serve.js b/serve.js index ad41e7d..bbc71b4 100755 --- a/serve.js +++ b/serve.js @@ -139,6 +139,14 @@ function run() { var letsencryptHost = argv['letsencrypt-certs']; var tls = require('tls'); + if (argv.V || argv.version || argv.v) { + if (argv.v) { + console.warn("flag -v is reserved for future use. Use -V or --version for version information."); + } + console.info('v' + require('./package.json').version); + return; + } + // letsencrypt var httpsOptions = require('localhost.daplie.com-certificates').merge({}); var secureContext;