From 172f7f3bc494f442456bdf92c99bf41adcb9ef7b Mon Sep 17 00:00:00 2001 From: AJ ONeal Date: Thu, 25 May 2017 15:43:50 -0600 Subject: [PATCH] load correct path and document package loading --- lib/com.daplie.walnut/index.html | 17 +++++++++++++++++ lib/main.js | 2 +- 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/lib/com.daplie.walnut/index.html b/lib/com.daplie.walnut/index.html index 40a1121..a139eb0 100644 --- a/lib/com.daplie.walnut/index.html +++ b/lib/com.daplie.walnut/index.html @@ -36,6 +36,23 @@ + + + +
HTML packages go in /srv/walnut/packages/pages
+REST packages go in /srv/walnut/packages/rest
+API packages go in /srv/walnut/packages/api
+
+There are two ways to set up a site.
+
+The first is to create a site package yourself by adding files.
+/srv/walnut/packages/sites/example.com/index.html
+
+The other is by providing a single text file of the name of the site with the name of the package to load
+/srv/walnut/packages/sites/example.com => com.example
+ + + diff --git a/lib/main.js b/lib/main.js index da83127..de18e68 100644 --- a/lib/main.js +++ b/lib/main.js @@ -59,7 +59,7 @@ module.exports.create = function (app, xconfx, apiFactories, apiDeps, errorIfApi if (!setupApp) { //setupApp = express.static(path.join(xconfx.staticpath, 'com.daplie.walnut')); - setupApp = express.static(path.join('lib', 'com.daplie.walnut')); + setupApp = express.static(path.join(__dirname, 'com.daplie.walnut')); } setupApp(req, res, function () { if ('/' === req.url) {