Skip to content

Commit

Permalink
feature(console) add support of express mount point (coderaiser/cloud…
Browse files Browse the repository at this point in the history
  • Loading branch information
coderaiser committed Oct 23, 2018
1 parent 622c38e commit b90af57
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion bin/console.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ function start() {
'0.0.0.0';

const online = false;
app .use(webconsole({
app .use('/', webconsole({
server,
online,
})).use(express.static(DIR));
Expand Down
2 changes: 2 additions & 0 deletions server/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ function _modulesFn(prefix, options, req, res, next) {
if (req.url !== '/modules.json')
return next();

prefix = req.baseUrl + prefix;
const urls = [];
const o = options;

Expand Down Expand Up @@ -103,6 +104,7 @@ function checkOption(isOption) {
function _konsoleFn(options, req, res, next) {
const o = options || {};
const prefix = o.prefix || '/console';

const {url} = req;

if (url.indexOf(prefix))
Expand Down

0 comments on commit b90af57

Please sign in to comment.