Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove host & port #10

Merged
merged 1 commit into from
Aug 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/few-dolls-exist.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"es-empty-script": patch
---

Use new version of edge scripting to avoid indicating the port & host
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"lint": "deno lint",
"test": "deno test --allow-none -A src/**/*.test.ts",
"check": "deno check src/main.ts",
"build": "mkdir dist && deno bundle src/main.ts dist/index.ts",
"build": "mkdir -p dist && deno bundle src/main.ts dist/index.ts",
"dev": "deno run src/main.ts",
"release": "echo \"No release\"",
"ci:version": "pnpm changeset version",
Expand Down
3 changes: 1 addition & 2 deletions src/main.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import * as BunnySDK from "https://esm.sh/@bunny.net/edgescript-sdk@0.9.3";
import * as BunnySDK from "https://esm.sh/@bunny.net/edgescript-sdk@0.10.0";

function sleep(ms: number): Promise<void> {
return new Promise((resolve) => setTimeout(resolve, ms));
Expand All @@ -9,7 +9,6 @@ const listener = BunnySDK.net.tcp.unstable_new();

console.log("Listening on: ", BunnySDK.net.tcp.toString(listener));
BunnySDK.net.http.serve(
listener,
async (req) => {
console.log(`[INFO]: ${req.method} - ${req.url}`);
await sleep(1);
Expand Down
Loading