🧁 An object-oriented Gemini server for Deno!
gemini-protocol deno typescript gemini
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

fix(server): re-static #hostname and #port

fuwn.net 1093a718 4ffddf6f

verified
+9 -9
+1 -1
examples/my_cool_server.ts
··· 72 72 73 73 override onListen() { 74 74 MyCoolServer.logger.info( 75 - `Listening on ${this.hostname}:${this.port}.`, 75 + `Listening on ${MyCoolServer.hostname}:${MyCoolServer.port}.`, 76 76 ); 77 77 } 78 78 }
+8 -8
laurali/server.ts
··· 39 39 /** All registered hook functions of the `Server` */ 40 40 static #hooks: Map<Hook, (ctx: Deno.TlsConn) => void> = new Map(); 41 41 /** The port of the `Server` */ 42 - #port: number; 42 + static #port: number; 43 43 /** The hostname of the `Server` */ 44 - #hostname: string; 44 + static #hostname: string; 45 45 46 46 /** 47 47 * @param certFile The path to the public key file of the `Server` ··· 56 56 const port = config?.port || 1965; 57 57 const hostname = config?.hostname || "0.0.0.0"; 58 58 59 - this.#port = port; 60 - this.#hostname = hostname; 59 + Server.#port = port; 60 + Server.#hostname = hostname; 61 61 62 62 this.#listener = Deno.listenTls({ 63 63 port, ··· 78 78 } 79 79 80 80 /** Get the `port` of the `Server` */ 81 - get port() { 82 - return this.#port; 81 + static get port() { 82 + return Server.#port; 83 83 } 84 84 85 85 /** Get the `hostname` of the `Server` */ 86 - get hostname() { 87 - return this.#hostname; 86 + static get hostname() { 87 + return Server.#hostname; 88 88 } 89 89 90 90 /** Called before a connection to a client has been responded to */