fix(LayServer) private variable typo
This commit is contained in:
@@ -255,7 +255,7 @@ export default class LayServer extends BaseRouter {
|
|||||||
*/
|
*/
|
||||||
async listen(port = 8080, cb = () => {}) {
|
async listen(port = 8080, cb = () => {}) {
|
||||||
try {
|
try {
|
||||||
this.proc = await Bun.serve({
|
this.#proc = await Bun.serve({
|
||||||
port,
|
port,
|
||||||
development: Bun.env.BUN_ENV != 'production',
|
development: Bun.env.BUN_ENV != 'production',
|
||||||
fetch: this.handleRequest.bind(this),
|
fetch: this.handleRequest.bind(this),
|
||||||
@@ -269,12 +269,12 @@ export default class LayServer extends BaseRouter {
|
|||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
if (!this.proc) {
|
if (!this.#proc) {
|
||||||
throw new Error('something went wrong');
|
throw new Error('something went wrong');
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!!cb && cb.constructor?.name.endsWith('Function')) {
|
if (!!cb && cb.constructor?.name.endsWith('Function')) {
|
||||||
cb(this.proc);
|
cb(this.#proc);
|
||||||
}
|
}
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
Logger.error('where', err.stack);
|
Logger.error('where', err.stack);
|
||||||
|
|||||||
Reference in New Issue
Block a user