From 1378a0c1f62f678e115168a94d13db5fdec3568e Mon Sep 17 00:00:00 2001 From: ansuz Date: Fri, 19 May 2017 16:56:45 +0200 Subject: [PATCH] serve blobs from configured location --- server.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/server.js b/server.js index d7f5b90fc..037a8adeb 100644 --- a/server.js +++ b/server.js @@ -8,6 +8,7 @@ var Fs = require('fs'); var WebSocketServer = require('ws').Server; var NetfluxSrv = require('./node_modules/chainpad-server/NetfluxWebsocketSrv'); var Package = require('./package.json'); +var Path = require("path"); var config = require('./config'); var websocketPort = config.websocketPort || config.httpPort; @@ -82,7 +83,7 @@ var mainPages = config.mainPages || ['index', 'privacy', 'terms', 'about', 'cont var mainPagePattern = new RegExp('^\/(' + mainPages.join('|') + ').html$'); app.get(mainPagePattern, Express.static(__dirname + '/customize.dist')); -app.use("/blob", Express.static(__dirname + '/blob')); +app.use("/blob", Express.static(Path.join(__dirname, (config.blobPath || './blob')))); app.use("/customize", Express.static(__dirname + '/customize')); app.use("/customize", Express.static(__dirname + '/customize.dist'));