-
Notifications
You must be signed in to change notification settings - Fork 2
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
1 parent
7c223b4
commit d36ca8e
Showing
6 changed files
with
28 additions
and
30 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--- | ||
"example/deno-simple-http-page": patch | ||
"example/simple-http-page": patch | ||
--- | ||
|
||
Added working examples with Node & Deno |
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 |
---|---|---|
@@ -1,13 +1,8 @@ | ||
import * as BunnySDK from "npm:@bunny.net/edgescript-sdk"; | ||
|
||
function sleep(ms) { | ||
return new Promise((resolve) => setTimeout(resolve, ms)); | ||
} | ||
import * as BunnySDK from "@bunny.net/edgescript-sdk"; | ||
|
||
console.log("Starting server..."); | ||
BunnySDK.net.http.serve({ port: 8080, hostname: '127.0.0.1' }, async (req) => { | ||
console.log("blbl"); | ||
console.log(req.url); | ||
return new Response("blbl"); | ||
}); | ||
console.log("net"); | ||
await sleep(100); |
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 |
---|---|---|
@@ -1,14 +1,6 @@ | ||
import * as BunnySDK from "@bunny.net/edgescript-sdk"; | ||
|
||
function sleep(ms) { | ||
return new Promise((resolve) => setTimeout(resolve, ms)); | ||
} | ||
|
||
BunnySDK.net.http.serve({ port: 8080, hostname: '127.0.0.1' }, async (req) => { | ||
console.log("blbl"); | ||
console.log(req.url); | ||
console.log("Starting server..."); | ||
BunnySDK.net.http.serve({ port: 8080, hostname: '127.0.0.1' }, async (_) => { | ||
return new Response("blbl"); | ||
}); | ||
console.log("net"); | ||
await sleep(10000); | ||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.