Skip to content
File

Blob: samples/module_fallback/config.capnp

525 bytes
1using Workerd = import "/workerd/workerd.capnp";
2 
3const helloWorldExample :Workerd.Config = (
4 services = [
5 (name = "main", worker = .helloWorld),
6 ],
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 (name = "cjs", commonJsModule = embed "cjs.js"),
15 ],
16 compatibilityDate = "2023-02-28",
17 compatibilityFlags = ["nodejs_compat"],
18 moduleFallback = "localhost:8888",
19);