feat(opsserver): serve embedded frontend bundle from committed ts_bundled instead of using external dist_serve directory
This commit is contained in:
@@ -2,6 +2,7 @@ import * as plugins from '../plugins.ts';
|
||||
import { logger } from '../logging.ts';
|
||||
import type { GitopsApp } from '../classes/gitopsapp.ts';
|
||||
import * as handlers from './handlers/index.ts';
|
||||
import { files as bundledFiles } from '../../ts_bundled/bundle.ts';
|
||||
|
||||
export class OpsServer {
|
||||
public gitopsAppRef: GitopsApp;
|
||||
@@ -22,11 +23,10 @@ export class OpsServer {
|
||||
}
|
||||
|
||||
public async start(port = 3000) {
|
||||
const absoluteServeDir = plugins.path.resolve('./dist_serve');
|
||||
this.server = new plugins.typedserver.utilityservers.UtilityWebsiteServer({
|
||||
domain: 'localhost',
|
||||
feedMetadata: undefined,
|
||||
serveDir: absoluteServeDir,
|
||||
bundledContent: bundledFiles,
|
||||
});
|
||||
|
||||
// Chain typedrouters
|
||||
|
||||
Reference in New Issue
Block a user