dynamically import routes
This commit is contained in:
1 parent
491e492206
commit
e8ed9fc3b8
3 files changed
+30
-34
No files matched your search
+1
-11
@@ -16,17 +16,7 @@ const vmidRegexP = "\\d+";
|
||||
|
||||
const basePath = `/:node(${nodeRegexP})/:type(${typeRegexP})/:vmid(${vmidRegexP})`;
|
||||
|
||||
import("./cluster/disk.js").then((module) => {
|
||||
router.use(`${basePath}/disk`, module.router);
|
||||
});
|
||||
|
||||
import("./cluster/net.js").then((module) => {
|
||||
router.use(`${basePath}/net`, module.router);
|
||||
});
|
||||
|
||||
import("./cluster/pci.js").then((module) => {
|
||||
router.use(`${basePath}/pci`, module.router);
|
||||
});
|
||||
global.utils.recursiveImport(router, basePath, "cluster", import.meta.url);
|
||||
|
||||
/**
|
||||
* GET - get available pcie devices given node and user
|
||||
|
||||
Reference in new issue
Block a user