diff --git a/lib/index.js b/lib/index.js index ba2ac2ef8..0f625a384 100644 --- a/lib/index.js +++ b/lib/index.js @@ -136,7 +136,7 @@ module.exports = function(config_hash) { res.send(template({ name: config.title || "Sinopia", packages: packages, - baseUrl: req.protocol + '://' + req.get('host') + '/' + baseUrl: config.root || req.protocol + '://' + req.get('host') + '/' })); }); }); @@ -273,7 +273,7 @@ module.exports = function(config_hash) { return require('highlight.js').highlightAuto(code).value; } }); - + app.get('/-/readme/:name/:version', function(req, res, next) { storage.get_readme(req.params.name, req.params.version, function(readme) { res.send(marked(readme));