load correct path and document package loading

This commit is contained in:
AJ ONeal 2017-05-25 15:43:50 -06:00
parent 66589782fe
commit 172f7f3bc4
2 changed files with 18 additions and 1 deletions

View File

@ -36,6 +36,23 @@
<!-- END TRACKJS -->
</head>
<body class="aj-pad-top fade" ng-class="{ in: R.ready }">
<pre><code>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</code></pre>
<!--[if lt IE 10]>
<p class="browsehappy">You are using an <strong>outdated</strong> browser. Please <a href="http://browsehappy.com/">upgrade your browser</a> to improve your experience.</p>
<![endif]-->

View File

@ -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) {