mirror of
https://seed.radicle.dev/rad:z4V1sjrXqjvFdnCUbxPFqd5p4DtH5.git
synced 2026-11-21 22:30:41 +08:00
Handle custom httpd port
We only supported fetching the default httpd port (8080). This commit removes navigation to `radicle.local` which represents `0.0.0.0:8080`, and prepares the app for defining custom port. Signed-off-by: Sebastian Martinez <me@sebastinez.dev>
This commit is contained in:
@@ -115,6 +115,28 @@ export class HttpdClient {
|
||||
this.session = new session.Client(this.#fetcher);
|
||||
}
|
||||
|
||||
public changePort(port: number): void {
|
||||
this.#baseUrl.port = port;
|
||||
}
|
||||
|
||||
public get url(): string {
|
||||
return `${this.#baseUrl.scheme}://${this.#baseUrl.hostname}:${
|
||||
this.#baseUrl.port
|
||||
}`;
|
||||
}
|
||||
|
||||
public get hostnamePort(): string {
|
||||
return `${this.#baseUrl.hostname}:${this.#baseUrl.port}`;
|
||||
}
|
||||
|
||||
public get hostname(): string {
|
||||
return this.#baseUrl.hostname;
|
||||
}
|
||||
|
||||
public get port(): string {
|
||||
return this.#baseUrl.port.toString();
|
||||
}
|
||||
|
||||
public async getNodeInfo(options?: RequestOptions): Promise<NodeInfo> {
|
||||
return this.#fetcher.fetchOk(
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user