@deepkit/framework
Version:
25 lines • 1.18 kB
JavaScript
/*
* Deepkit Framework
* Copyright (C) 2021 Deepkit UG, Marc J. Schmidt
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the MIT License.
*
* You should have received a copy of the MIT License along with this program.
*/
import { registerStaticHttpController } from '@deepkit/http';
import { AppModule, findParentPath } from '@deepkit/app';
import { dirname } from 'path';
import { getCurrentFileName } from '@deepkit/core';
export function registerDebugHttpController(module, path) {
const currentDir = dirname(getCurrentFileName());
const localPath = findParentPath('node_modules/@deepkit/framework-debug-gui/dist/framework-debug-gui', currentDir);
if (localPath) {
registerStaticHttpController(module, { path, localPath, groups: ['app-static'], controllerName: 'FrameworkDebuggerController' });
}
else {
console.log('Warning: node_modules/@deepkit/framework-debug-gui no build found in ' + currentDir);
}
}
registerDebugHttpController.__type = [() => AppModule, 'module', 'path', 'registerDebugHttpController', 'PP"7!2"&2#$/$'];
//# sourceMappingURL=http-debug.controller.js.map