From 43e6333377436a7e7f945edccc65b163e419dbc7 Mon Sep 17 00:00:00 2001 From: AJ ONeal Date: Wed, 21 Jan 2015 13:29:44 -0700 Subject: [PATCH] more friendly path display --- bin/deardesi.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/bin/deardesi.js b/bin/deardesi.js index dd99015..4a7cd72 100755 --- a/bin/deardesi.js +++ b/bin/deardesi.js @@ -21,7 +21,7 @@ function init() { Desi.registerDataMapper('ruhoh@2.6', require('desirae-datamap-ruhoh').DesiraeDatamapRuhoh); } -function serve(blogdir) { +function serve(displayDir, blogdir) { var http = require('http') //, https = require('https') , app = require('../server').create({ blogdir: blogdir }) @@ -29,7 +29,7 @@ function serve(blogdir) { ; server = http.createServer(app).listen(65080, function () { - console.info("Listening from " + blogdir); + console.info("Listening from " + displayDir); console.info("Listening on http://local.dear.desi:" + server.address().port); }); //secureServer = https.createServer(app).listen(65043); @@ -202,7 +202,10 @@ cli.main(function (args, options) { return; } else if ('serve' === command) { - serve(blogdir); + var displayPath = path.resolve(originalDir).replace(/^\/(Users|home)\/[^\/]+\//, '~/').replace(/ /g, '\\ ') + ; + + serve(displayPath, blogdir); return; } else {