Skip to content
File

Blob: samples/tail-workers/config.capnp

625 bytes
1using Workerd = import "/workerd/workerd.capnp";
2 
3const tailWorkerExample :Workerd.Config = (
4 services = [
5 (name = "main", worker = .helloWorld),
6 (name = "log", worker = .logWorker),
7 ],
8 sockets = [ ( name = "http", address = "*:8080", http = (), service = "main" ) ],
9);
10 
11const helloWorld :Workerd.Worker = (
12 modules = [
13 (name = "worker", esModule = embed "worker.js")
14 ],
15 compatibilityDate = "2024-10-14",
16 tails = ["log"],
17 streamingTails = ["log"],
18);
19 
20const logWorker :Workerd.Worker = (
21 modules = [
22 (name = "worker", esModule = embed "tail.js")
23 ],
24 compatibilityDate = "2024-10-14",
25);