File
Blob: samples/eventsource/config.capnp
| 1 | # Copyright (c) 2017-2024 Cloudflare, Inc. |
| 2 | # Licensed under the Apache 2.0 license found in the LICENSE file or at: |
| 3 | # https://opensource.org/licenses/Apache-2.0 |
| 4 | |
| 5 | using Workerd = import "/workerd/workerd.capnp"; |
| 6 | |
| 7 | const eventSourceExample :Workerd.Config = ( |
| 8 | |
| 9 | services = [ |
| 10 | (name = "main", worker = .eventsource), |
| 11 | (name = "internet", network = (allow = ["private"])) |
| 12 | ], |
| 13 | |
| 14 | sockets = [ ( name = "http", address = "*:8080", http = (), service = "main" ) ] |
| 15 | ); |
| 16 | |
| 17 | const eventsource :Workerd.Worker = ( |
| 18 | modules = [ |
| 19 | (name = "worker", esModule = embed "worker.js") |
| 20 | ], |
| 21 | compatibilityDate = "2024-05-31", |
| 22 | ); |