wiki-plugin-shoppe 0.0.8 → 0.0.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/server/server.js +6 -4
package/package.json
CHANGED
package/server/server.js
CHANGED
|
@@ -9,9 +9,10 @@ const sessionless = require('sessionless-node');
|
|
|
9
9
|
|
|
10
10
|
const SHOPPE_BASE_EMOJI = process.env.SHOPPE_BASE_EMOJI || '🛍️🎨🎁';
|
|
11
11
|
|
|
12
|
-
const
|
|
13
|
-
const
|
|
14
|
-
const
|
|
12
|
+
const DATA_DIR = path.join(process.env.HOME || '/root', '.shoppe');
|
|
13
|
+
const TENANTS_FILE = path.join(DATA_DIR, 'tenants.json');
|
|
14
|
+
const CONFIG_FILE = path.join(DATA_DIR, 'config.json');
|
|
15
|
+
const TMP_DIR = '/tmp/shoppe-uploads';
|
|
15
16
|
|
|
16
17
|
// ============================================================
|
|
17
18
|
// CONFIG (allyabase URL, etc.)
|
|
@@ -705,7 +706,8 @@ function generateShoppeHTML(tenant, goods) {
|
|
|
705
706
|
async function startServer(params) {
|
|
706
707
|
const app = params.app;
|
|
707
708
|
|
|
708
|
-
if (!fs.existsSync(
|
|
709
|
+
if (!fs.existsSync(DATA_DIR)) fs.mkdirSync(DATA_DIR, { recursive: true });
|
|
710
|
+
if (!fs.existsSync(TMP_DIR)) fs.mkdirSync(TMP_DIR, { recursive: true });
|
|
709
711
|
console.log('🛍️ wiki-plugin-shoppe starting...');
|
|
710
712
|
|
|
711
713
|
const owner = (req, res, next) => {
|