Skip to content

Commit

Permalink
[server] Move DebugApp to protocol
Browse files Browse the repository at this point in the history
  • Loading branch information
geropl committed Jun 14, 2022
1 parent e3f9ca5 commit 60131ac
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 5 deletions.
2 changes: 2 additions & 0 deletions components/gitpod-protocol/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
"@types/analytics-node": "^3.1.5",
"@types/chai-subset": "^1.3.3",
"@types/cookie": "^0.4.1",
"@types/express": "^4.17.13",
"@types/jaeger-client": "^3.18.3",
"@types/js-yaml": "^3.10.1",
"@types/mocha": "^5.2.7",
Expand Down Expand Up @@ -42,6 +43,7 @@
"ajv": "^6.5.4",
"analytics-node": "^4.0.1",
"cookie": "^0.4.2",
"express": "^4.17.3",
"inversify": "^5.1.1",
"jaeger-client": "^3.18.1",
"js-yaml": "^3.10.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import * as http from "http";
import * as express from "express";
import { injectable, postConstruct } from "inversify";
import { log, LogrusLogLevel } from "@gitpod/gitpod-protocol/lib/util/logging";
import { log, LogrusLogLevel } from "./logging";

export interface SetLogLevelRequest {
level: LogrusLogLevel;
Expand Down Expand Up @@ -53,7 +53,7 @@ export class DebugApp {
return app;
}

public start(port: number) {
public start(port: number = 6060) {
this.httpServer = this._app.listen(port, "localhost", () => {
log.info(`debug server listening on port: ${port}`);
});
Expand Down
2 changes: 1 addition & 1 deletion components/server/src/container-module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ import { defaultGRPCOptions } from "@gitpod/gitpod-protocol/lib/util/grpc";
import { IDEConfigService } from "./ide-config";
import { PrometheusClientCallMetrics } from "@gitpod/gitpod-protocol/lib/messaging/client-call-metrics";
import { IClientCallMetrics } from "@gitpod/content-service/lib/client-call-metrics";
import { DebugApp } from "./debug-app";
import { DebugApp } from "@gitpod/gitpod-protocol/lib/util/debug-app";
import { LocalMessageBroker, LocalRabbitMQBackedMessageBroker } from "./messaging/local-message-broker";
import { contentServiceBinder } from "@gitpod/content-service/lib/sugar";
import { ReferrerPrefixParser } from "./workspace/referrer-prefix-context-parser";
Expand Down
4 changes: 2 additions & 2 deletions components/server/src/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ import {
} from "./workspace/headless-log-controller";
import { NewsletterSubscriptionController } from "./user/newsletter-subscription-controller";
import { Config } from "./config";
import { DebugApp } from "./debug-app";
import { DebugApp } from "@gitpod/gitpod-protocol/lib/util/debug-app";
import { LocalMessageBroker } from "./messaging/local-message-broker";
import { WsConnectionHandler } from "./express/ws-connection-handler";
import { InstallationAdminController } from "./installation-admin/installation-admin-controller";
Expand Down Expand Up @@ -334,7 +334,7 @@ export class Server<C extends GitpodClient, S extends GitpodServer> {
});
}

this.debugApp.start(6060);
this.debugApp.start();
}

public async stop() {
Expand Down

0 comments on commit 60131ac

Please sign in to comment.