Add foreground service, some cleanup, and start websocket server

This commit is contained in:
2022-07-13 21:35:18 -05:00
parent 4d7769de56
commit 6476416c67
12 changed files with 158 additions and 43 deletions

View File

@@ -12,7 +12,6 @@ import {PackageDiscovered} from '../support/PackageDiscovered'
import {staticServer} from '../http/servers/static'
import {Bus} from '../support/bus'
import {RequestLocalStorage} from '../http/RequestLocalStorage'
import {env} from '../lifecycle/Application'
/**
* Application unit that loads the various route files from `app/http/routes` and pre-compiles the route handlers.
@@ -106,7 +105,7 @@ export class Routing extends Unit {
* @param method
* @param path
*/
public match(method: HTTPMethod, path: string): Route<unknown, unknown[]> | undefined {
public match(method: 'ws' | HTTPMethod, path: string): Route<unknown, unknown[]> | undefined {
return this.compiledRoutes.firstWhere(route => {
return route.match(method, path)
})