apppath => pagespath

This commit is contained in:
AJ ONeal 2015-11-21 20:47:28 +00:00
parent 4b083cf7d5
commit 46aebe069f
4 changed files with 7 additions and 7 deletions

View File

@ -68,7 +68,7 @@ function loadPages(pkgConf, route, req, res, next) {
var PromiseA = require('bluebird'); var PromiseA = require('bluebird');
var fs = require('fs'); var fs = require('fs');
var path = require('path'); 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) // TODO special cases for /.well_known/ and similar (oauth3.html, oauth3.json, webfinger, etc)

View File

@ -1,7 +1,7 @@
'use strict'; 'use strict';
module.exports.getDomainInfo = function (apppath) { module.exports.getDomainInfo = function (instancename) {
var parts = apppath.split(/[#%]+/); var parts = instancename.split(/[#%]+/);
var hostname = parts.shift(); var hostname = parts.shift();
var pathname = parts.join('/').replace(/\/+/g, '/').replace(/\/$/g, '').replace(/^\//g, ''); var pathname = parts.join('/').replace(/\/+/g, '/').replace(/\/$/g, '').replace(/^\//g, '');
@ -9,7 +9,7 @@ module.exports.getDomainInfo = function (apppath) {
hostname: hostname hostname: hostname
, pathname: pathname , pathname: pathname
, dirpathname: parts.join('#') , dirpathname: parts.join('#')
, dirname: apppath , dirname: instancename
, isRoot: apppath === hostname , isRoot: instancename === hostname
}; };
}; };

View File

@ -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/ // 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} // this means that any packages must be outside, perhaps /srv/walnut/{boot,core,packages}
var pkgConf = { 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 , apipath: path.join(__dirname, '..', '..', 'packages', 'apis') + path.sep
, servicespath: path.join(__dirname, '..', '..', 'packages', 'services') , servicespath: path.join(__dirname, '..', '..', 'packages', 'services')
, vhostsMap: vhostsMap , vhostsMap: vhostsMap

View File

@ -41,7 +41,7 @@ var results = {
var req = { host: 'hellabit.com', url: '/connect' }; var req = { host: 'hellabit.com', url: '/connect' };
module.exports.create({ module.exports.create({
apppath: '../packages/apps/' pagespath: '../packages/apps/'
, apipath: '../packages/apis/' , apipath: '../packages/apis/'
, vhostsMap: vhostsMap , vhostsMap: vhostsMap
}).api(req); }).api(req);