-
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
12 changed files
with
728 additions
and
390 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,7 +11,7 @@ jobs: | |
- uses: actions/checkout@v2 | ||
- uses: denolib/setup-deno@v2 | ||
with: | ||
deno-version: 1.25.0 | ||
deno-version: 1.40.2 | ||
- run: deno install -A -f --unstable -n eggs https://x.nest.land/[email protected]/eggs.ts | ||
- run: | | ||
export PATH="/home/runner/.deno/bin:$PATH" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,7 +12,7 @@ ci: | |
@make test | ||
|
||
deps: | ||
@npm install -g typescript [email protected] | ||
@npm install -g typescript@4 [email protected] | ||
|
||
doc: | ||
@deno doc ./mod.ts | ||
|
@@ -24,7 +24,7 @@ fmt-check: | |
@deno fmt --check ${FILES_TO_FORMAT} | ||
|
||
lint: | ||
@deno lint --unstable ${FILES_TO_FORMAT} | ||
@deno lint ${FILES_TO_FORMAT} | ||
|
||
precommit: | ||
@make typedoc | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,14 +14,14 @@ Proxy middleware for Deno Opine HTTP servers. | |
|
||
<p align="left"> | ||
<a href="https://deno.land/x/opineHttpProxy"><img src="https://img.shields.io/endpoint?url=https%3A%2F%2Fdeno-visualizer.danopia.net%2Fshields%2Flatest-version%2Fx%2FopineHttpProxy%2Fmod.ts" alt="opine-http-proxy latest /x/ version" /></a> | ||
<a href="https://github.com/denoland/deno/blob/main/Releases.md"><img src="https://img.shields.io/badge/deno-^1.25.0-brightgreen?logo=deno" alt="Minimum supported Deno version" /></a> | ||
<a href="https://github.com/denoland/deno/blob/main/Releases.md"><img src="https://img.shields.io/badge/deno-^1.40.2-brightgreen?logo=deno" alt="Minimum supported Deno version" /></a> | ||
<a href="https://deno-visualizer.danopia.net/dependencies-of/https/deno.land/x/opineHttpProxy/mod.ts"><img src="https://img.shields.io/endpoint?url=https%3A%2F%2Fdeno-visualizer.danopia.net%2Fshields%2Fdep-count%2Fx%2FopineHttpProxy%2Fmod.ts" alt="opine-http-proxy dependency count" /></a> | ||
<a href="https://deno-visualizer.danopia.net/dependencies-of/https/deno.land/x/opineHttpProxy/mod.ts"><img src="https://img.shields.io/endpoint?url=https%3A%2F%2Fdeno-visualizer.danopia.net%2Fshields%2Fupdates%2Fx%2FopineHttpProxy%2Fmod.ts" alt="opine-http-proxy dependency outdatedness" /></a> | ||
<a href="https://deno-visualizer.danopia.net/dependencies-of/https/deno.land/x/opineHttpProxy/mod.ts"><img src="https://img.shields.io/endpoint?url=https%3A%2F%2Fdeno-visualizer.danopia.net%2Fshields%2Fcache-size%2Fx%2FopineHttpProxy%2Fmod.ts" alt="opine-http-proxy cached size" /></a> | ||
</p> | ||
|
||
```ts | ||
import { proxy } from "https://deno.land/x/opineHttpProxy@3.0.2/mod.ts"; | ||
import { proxy } from "https://deno.land/x/opineHttpProxy@3.1.0/mod.ts"; | ||
import { opine } from "https://deno.land/x/[email protected]/mod.ts"; | ||
|
||
const app = opine(); | ||
|
@@ -41,7 +41,7 @@ Before importing, [download and install Deno](https://deno.land/#installation). | |
You can then import opine-http-proxy straight into your project: | ||
|
||
```ts | ||
import { proxy } from "https://deno.land/x/opineHttpProxy@3.0.2/mod.ts"; | ||
import { proxy } from "https://deno.land/x/opineHttpProxy@3.1.0/mod.ts"; | ||
``` | ||
|
||
## Docs | ||
|
@@ -65,7 +65,10 @@ app.get("/string", proxy("http://google.com")); | |
|
||
app.get("/url", proxy(new URL("http://google.com"))); | ||
|
||
app.get("/function", proxy(() => new URL("http://google.com"))); | ||
app.get( | ||
"/function", | ||
proxy(() => new URL("http://google.com")), | ||
); | ||
``` | ||
|
||
### Proxy Options | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
export { join } from "https://deno.land/std@0.153.0/path/mod.ts"; | ||
export { read } from "https://deno.land/x/[email protected].1/src/middleware/bodyParser/read.ts"; | ||
export { parseUrl } from "https://deno.land/x/[email protected].1/src/utils/parseUrl.ts"; | ||
export { join } from "https://deno.land/std@0.213.0/path/mod.ts"; | ||
export { read } from "https://deno.land/x/[email protected].4/src/middleware/bodyParser/read.ts"; | ||
export { parseUrl } from "https://deno.land/x/[email protected].4/src/utils/parseUrl.ts"; |
Oops, something went wrong.