Implement websocket server

This commit is contained in:
2022-07-14 01:15:16 -05:00
parent dc663ec8f5
commit 33a64b99ff
15 changed files with 546 additions and 27 deletions

View File

@@ -35,16 +35,6 @@ export interface ModuleRegistrationFluency {
core: () => HTTPKernel,
}
/**
* Error thrown when a kernel module is requested that does not exist w/in the kernel.
* @extends Error
*/
export class KernelModuleNotFoundError extends Error {
constructor(name: string) {
super(`The kernel module ${name} is not registered with the kernel.`)
}
}
/**
* A singleton class that handles requests, applying logic in modular layers.
*/
@@ -140,8 +130,6 @@ export class HTTPKernel extends AppClass {
if ( typeof foundIdx !== 'undefined' ) {
this.postflight = this.postflight.put(foundIdx, this.app().make(module))
} else {
throw new KernelModuleNotFoundError(other.name)
}
return this
@@ -162,8 +150,6 @@ export class HTTPKernel extends AppClass {
if ( typeof foundIdx !== 'undefined' ) {
this.postflight = this.postflight.put(foundIdx + 1, this.app().make(module))
} else {
throw new KernelModuleNotFoundError(other.name)
}
return this