adminforth 2.2.0-next.18 → 2.2.0-next.19
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.
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import express from 'express';
|
|
2
2
|
import AdminForth from 'adminforth';
|
|
3
3
|
import usersResource from "./resources/adminuser.js";
|
|
4
|
+
import { fileURLToPath } from 'url';
|
|
5
|
+
import path from 'path';
|
|
4
6
|
|
|
5
7
|
const ADMIN_BASE_URL = '';
|
|
6
8
|
|
|
@@ -55,9 +57,10 @@ export const admin = new AdminForth({
|
|
|
55
57
|
],
|
|
56
58
|
});
|
|
57
59
|
|
|
58
|
-
|
|
59
|
-
const
|
|
60
|
-
|
|
60
|
+
const currentFilePath = fileURLToPath(import.meta.url);
|
|
61
|
+
const executedFilePath = path.resolve(process.argv[1]);
|
|
62
|
+
|
|
63
|
+
if (currentFilePath === executedFilePath) {
|
|
61
64
|
const app = express();
|
|
62
65
|
app.use(express.json());
|
|
63
66
|
|