serve blobs from configured location

pull/1/head
ansuz 8 years ago
parent 0a54f0cf2d
commit 1378a0c1f6

@ -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'));

Loading…
Cancel
Save