This repository was archived by the owner on Jul 6, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 5 files changed +20
-3
lines changed Expand file tree Collapse file tree 5 files changed +20
-3
lines changed Original file line number Diff line number Diff line change 1
- import { Application } from '../server/mod .ts'
1
+ import { Application } from '../server/app .ts'
2
2
3
3
export const helpMessage = `
4
4
Usage:
Original file line number Diff line number Diff line change 1
1
import { getFlag , parsePortNumber } from '../server/helper.ts'
2
- import { Application , serve } from '../server/mod.ts'
2
+ import { Application } from '../server/app.ts'
3
+ import { serve } from '../server/stdserver.ts'
3
4
4
5
export const helpMessage = `
5
6
Usage:
Original file line number Diff line number Diff line change 1
1
import { getFlag , parsePortNumber } from '../server/helper.ts'
2
- import { Application , serve } from '../server/mod.ts'
2
+ import { Application } from '../server/app.ts'
3
+ import { serve } from '../server/stdserver.ts'
3
4
import log from '../shared/log.ts'
4
5
5
6
export const helpMessage = `
Original file line number Diff line number Diff line change 1
1
export * from './app.ts'
2
2
export * from './server.ts'
3
3
export * from './stdserver.ts'
4
+ export * from './oak.ts'
Original file line number Diff line number Diff line change
1
+ import type { Middleware , Context } from 'https://deno.land/x/oak/mod.ts'
2
+ import { Application } from './app.ts'
3
+ import { Server } from './server.ts'
4
+
5
+ /** Create an oak middleware for Aleph server. */
6
+ export function alephOak ( app : Application ) : Middleware {
7
+ const server = new Server ( app )
8
+
9
+ return ( ctx : Context ) => {
10
+ const req = ctx . request as any
11
+ server . handle ( req . originalRequest || req . serverRequest )
12
+ ctx . respond = false
13
+ }
14
+ }
You can’t perform that action at this time.
0 commit comments