Skip to content

Commit

Permalink
bump std and update example
Browse files Browse the repository at this point in the history
  • Loading branch information
v1rtl committed May 3, 2023
1 parent f0acdc9 commit e8fdfdd
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 9 deletions.
9 changes: 2 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,10 @@ Deno port of [forwarded](https://github.com/jshttp/forwarded/) library.
## Usage

```ts
import { Server } from 'https://deno.land/std@0.181.0/http/server.ts'
import { serve } from 'https://deno.land/std@0.185.0/http/server.ts'
import { forwarded, parse } from 'https://deno.land/x/forwarded/mod.ts'

const s = new Server({
port: 8080,
handler: (req) => {
return new Response(JSON.stringify(forwarded(req))
}
})
await serve((req) => new Response(JSON.stringify(forwarded(req)), { port: 8080 })
```
## API
Expand Down
2 changes: 1 addition & 1 deletion mod.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { ConnInfo } from 'https://deno.land/std@0.181.0/http/server.ts'
import type { ConnInfo } from 'https://deno.land/std@0.185.0/http/server.ts'

export type RequestWithConnection = Request & { conn: ConnInfo }

Expand Down
2 changes: 1 addition & 1 deletion mod_test.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type { RequestWithConnection } from './mod.ts'
import { forwarded } from './mod.ts'
import type { ConnInfo } from 'https://deno.land/std@0.181.0/http/server.ts'
import type { ConnInfo } from 'https://deno.land/std@0.185.0/http/server.ts'
import { describe, it, expect, run } from 'https://deno.land/x/[email protected]/mod.ts'

const createReq = (hostname: string, headers?: Record<string, string>): RequestWithConnection =>
Expand Down

0 comments on commit e8fdfdd

Please sign in to comment.