instbyte 1.9.1 → 1.9.2
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/LICENSE +21 -21
- package/README.md +360 -230
- package/bin/instbyte.js +27 -27
- package/client/assets/lucide.min.js +12 -0
- package/client/css/app.css +1972 -1972
- package/client/index.html +94 -94
- package/client/js/app.js +1648 -1613
- package/package.json +8 -5
- package/server/cleanup.js +27 -26
- package/server/config.js +69 -69
- package/server/db.js +60 -60
- package/server/server.js +867 -865
package/bin/instbyte.js
CHANGED
|
@@ -1,28 +1,28 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
|
|
3
|
-
"use strict";
|
|
4
|
-
|
|
5
|
-
const path = require("path");
|
|
6
|
-
const fs = require("fs");
|
|
7
|
-
|
|
8
|
-
// ========================
|
|
9
|
-
// DATA DIRECTORY SETUP
|
|
10
|
-
// ========================
|
|
11
|
-
// When run via npx or global install, we want data to live
|
|
12
|
-
// in the user's current working directory, not inside the
|
|
13
|
-
// npm cache or global node_modules.
|
|
14
|
-
|
|
15
|
-
const dataDir = path.join(process.cwd(), "instbyte-data");
|
|
16
|
-
const uploadsDir = path.join(dataDir, "uploads");
|
|
17
|
-
|
|
18
|
-
if (!fs.existsSync(dataDir)) fs.mkdirSync(dataDir, { recursive: true });
|
|
19
|
-
if (!fs.existsSync(uploadsDir)) fs.mkdirSync(uploadsDir, { recursive: true });
|
|
20
|
-
|
|
21
|
-
// Pass locations to the rest of the app via env vars
|
|
22
|
-
process.env.INSTBYTE_DATA = dataDir;
|
|
23
|
-
process.env.INSTBYTE_UPLOADS = uploadsDir;
|
|
24
|
-
|
|
25
|
-
// ========================
|
|
26
|
-
// BOOT
|
|
27
|
-
// ========================
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
"use strict";
|
|
4
|
+
|
|
5
|
+
const path = require("path");
|
|
6
|
+
const fs = require("fs");
|
|
7
|
+
|
|
8
|
+
// ========================
|
|
9
|
+
// DATA DIRECTORY SETUP
|
|
10
|
+
// ========================
|
|
11
|
+
// When run via npx or global install, we want data to live
|
|
12
|
+
// in the user's current working directory, not inside the
|
|
13
|
+
// npm cache or global node_modules.
|
|
14
|
+
|
|
15
|
+
const dataDir = path.join(process.cwd(), "instbyte-data");
|
|
16
|
+
const uploadsDir = path.join(dataDir, "uploads");
|
|
17
|
+
|
|
18
|
+
if (!fs.existsSync(dataDir)) fs.mkdirSync(dataDir, { recursive: true });
|
|
19
|
+
if (!fs.existsSync(uploadsDir)) fs.mkdirSync(uploadsDir, { recursive: true });
|
|
20
|
+
|
|
21
|
+
// Pass locations to the rest of the app via env vars
|
|
22
|
+
process.env.INSTBYTE_DATA = dataDir;
|
|
23
|
+
process.env.INSTBYTE_UPLOADS = uploadsDir;
|
|
24
|
+
|
|
25
|
+
// ========================
|
|
26
|
+
// BOOT
|
|
27
|
+
// ========================
|
|
28
28
|
require("../server/server.js");
|