apppath => pagespath
This commit is contained in:
parent
4b083cf7d5
commit
46aebe069f
|
@ -68,7 +68,7 @@ function loadPages(pkgConf, route, req, res, next) {
|
|||
var PromiseA = require('bluebird');
|
||||
var fs = require('fs');
|
||||
var path = require('path');
|
||||
var pkgpath = path.join(pkgConf.apppath, (route.app.package || route.app.id), (route.app.version || ''));
|
||||
var pkgpath = path.join(pkgConf.pagespath, (route.app.package || route.app.id), (route.app.version || ''));
|
||||
|
||||
// TODO special cases for /.well_known/ and similar (oauth3.html, oauth3.json, webfinger, etc)
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
'use strict';
|
||||
|
||||
module.exports.getDomainInfo = function (apppath) {
|
||||
var parts = apppath.split(/[#%]+/);
|
||||
module.exports.getDomainInfo = function (instancename) {
|
||||
var parts = instancename.split(/[#%]+/);
|
||||
var hostname = parts.shift();
|
||||
var pathname = parts.join('/').replace(/\/+/g, '/').replace(/\/$/g, '').replace(/^\//g, '');
|
||||
|
||||
|
@ -9,7 +9,7 @@ module.exports.getDomainInfo = function (apppath) {
|
|||
hostname: hostname
|
||||
, pathname: pathname
|
||||
, dirpathname: parts.join('#')
|
||||
, dirname: apppath
|
||||
, isRoot: apppath === hostname
|
||||
, dirname: instancename
|
||||
, isRoot: instancename === hostname
|
||||
};
|
||||
};
|
||||
|
|
|
@ -165,7 +165,7 @@ module.exports.create = function (webserver, info, state) {
|
|||
// rm -rf /tmp/walnut/; tar xvf -C /tmp/walnut/; mv /srv/walnut /srv/walnut.{{version}}; mv /tmp/walnut /srv/
|
||||
// this means that any packages must be outside, perhaps /srv/walnut/{boot,core,packages}
|
||||
var pkgConf = {
|
||||
apppath: path.join(__dirname, '..', '..', 'packages', 'apps') + path.sep
|
||||
pagespath: path.join(__dirname, '..', '..', 'packages', 'pages') + path.sep
|
||||
, apipath: path.join(__dirname, '..', '..', 'packages', 'apis') + path.sep
|
||||
, servicespath: path.join(__dirname, '..', '..', 'packages', 'services')
|
||||
, vhostsMap: vhostsMap
|
||||
|
|
|
@ -41,7 +41,7 @@ var results = {
|
|||
|
||||
var req = { host: 'hellabit.com', url: '/connect' };
|
||||
module.exports.create({
|
||||
apppath: '../packages/apps/'
|
||||
pagespath: '../packages/apps/'
|
||||
, apipath: '../packages/apis/'
|
||||
, vhostsMap: vhostsMap
|
||||
}).api(req);
|
||||
|
|
Loading…
Reference in New Issue