notherbase-fs 4.0.1 → 4.0.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/notherbase-fs.js +0 -1
- package/package.json +1 -1
- package/test-index.js +3 -2
package/notherbase-fs.js
CHANGED
|
@@ -21,7 +21,6 @@ class NotherBaseFS {
|
|
|
21
21
|
this.bases = bases;
|
|
22
22
|
let baseKeys = Object.keys(this.bases);
|
|
23
23
|
for (let i = 0; i < baseKeys.length; i++) {
|
|
24
|
-
this.bases[baseKeys[i]].directory = fileURLToPath(new URL(this.bases[baseKeys[i]].directory, import.meta.url));
|
|
25
24
|
this.bases[baseKeys[i]].static = express.static(this.bases[baseKeys[i]].directory + "/public");
|
|
26
25
|
this.bases[baseKeys[i]].favicon = favicon(this.bases[baseKeys[i]].directory + this.bases[baseKeys[i]].icon);
|
|
27
26
|
this.bases[baseKeys[i]].session = session({
|
package/package.json
CHANGED
package/test-index.js
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import NotherBaseFS from "./notherbase-fs.js";
|
|
2
|
+
import { fileURLToPath } from 'node:url';
|
|
2
3
|
|
|
3
4
|
const notherBaseFS = new NotherBaseFS({}, {
|
|
4
5
|
notherbase: {
|
|
5
|
-
directory: './test',
|
|
6
|
+
directory: fileURLToPath(new URL('./test', import.meta.url)),
|
|
6
7
|
icon: '/public/drum.png'
|
|
7
8
|
},
|
|
8
9
|
test: {
|
|
9
|
-
directory: './test2',
|
|
10
|
+
directory: fileURLToPath(new URL('./test2', import.meta.url)),
|
|
10
11
|
icon: '/public/drum.png'
|
|
11
12
|
}
|
|
12
13
|
});
|