mirror of
https://github.com/denoland/deno.git
synced 2025-02-02 04:38:21 -05:00
16 lines
337 B
TypeScript
16 lines
337 B
TypeScript
|
// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license.
|
||
|
|
||
|
import { serve } from "../../std/http/server.ts";
|
||
|
|
||
|
const server = serve({ port: 8080 });
|
||
|
|
||
|
self.onmessage = (e: MessageEvent) => {
|
||
|
console.log("TLA worker received message", e.data);
|
||
|
};
|
||
|
|
||
|
self.postMessage("hello");
|
||
|
|
||
|
for await (const _r of server) {
|
||
|
// pass
|
||
|
}
|