This repository was archived by the owner on Jul 6, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +3
-2
lines changed Expand file tree Collapse file tree 2 files changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -170,7 +170,7 @@ if (import.meta.main) {
170
170
} ;
171
171
emitter . on ( "create" , updateRoutes ) ;
172
172
emitter . on ( "remove" , updateRoutes ) ;
173
- // updateRoutes({});
173
+ updateRoutes ( { } ) ;
174
174
175
175
if ( serverEntry ) {
176
176
emitter . on ( `hotUpdate:./${ basename ( serverEntry ) } ` , bs ) ;
Original file line number Diff line number Diff line change @@ -3,6 +3,7 @@ import { serve as stdServe, serveTls } from "https://deno.land/
[email protected] /http/
3
3
import { readableStreamFromReader } from "https://deno.land/[email protected] /streams/conversion.ts" ;
4
4
import { VERSION } from "https://deno.land/x/[email protected] /version.ts" ;
5
5
import FetchError from "../framework/core/fetch_error.ts" ;
6
+ import type { RouteRecord } from "../framework/core/route.ts" ;
6
7
import log , { LevelName } from "../lib/log.ts" ;
7
8
import { getContentType } from "../lib/mime.ts" ;
8
9
import util from "../lib/util.ts" ;
@@ -277,7 +278,7 @@ export const serve = (options: ServerOptions = {}) => {
277
278
}
278
279
279
280
// request data
280
- const routes = await routesPromise ;
281
+ const routes : RouteRecord = Reflect . get ( globalThis , "__ALEPH_ROUTES" ) || await routesPromise ;
281
282
if ( routes . routes . length > 0 ) {
282
283
for ( const [ pattern , { filename } ] of routes . routes ) {
283
284
const ret = pattern . exec ( { host, pathname } ) ;
You can’t perform that action at this time.
0 commit comments