mirror of
https://github.com/denoland/deno.git
synced 2024-12-22 15:24:46 -05:00
cleanup(bench/deno_http_native): don't use Deno.core funcs (#10460)
`Deno.core.*` is unstable and not fit for public consumption, although this is a somewhat internal bench some people may use it as reference code and start using `Deno.core.encode()` in their own code
This commit is contained in:
parent
8377957666
commit
c9ac851b90
1 changed files with 2 additions and 1 deletions
|
@ -5,7 +5,8 @@ const [hostname, port] = addr.split(":");
|
||||||
const listener = Deno.listen({ hostname, port: Number(port) });
|
const listener = Deno.listen({ hostname, port: Number(port) });
|
||||||
console.log("Server listening on", addr);
|
console.log("Server listening on", addr);
|
||||||
|
|
||||||
const body = Deno.core.encode("Hello World");
|
const encoder = new TextEncoder();
|
||||||
|
const body = encoder.encode("Hello World");
|
||||||
|
|
||||||
for await (const conn of listener) {
|
for await (const conn of listener) {
|
||||||
(async () => {
|
(async () => {
|
||||||
|
|
Loading…
Reference in a new issue