instbyte 1.9.0 → 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/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");