Skip to content
File

Blob: samples/pyodide-env/config.capnp

868 bytes
1using Workerd = import "/workerd/workerd.capnp";
2 
3const config :Workerd.Config = (
4 services = [
5 (name = "main", worker = .mainWorker),
6 ],
7 
8 sockets = [
9 # Serve HTTP on port 8080.
10 ( name = "http",
11 address = "*:8080",
12 http = (),
13 service = "main"
14 ),
15 ],
16 autogates = [
17 # Pyodide is included as a builtin wasm module so it requires the
18 # corresponding autogate flag.
19 "workerd-autogate-builtin-wasm-modules",
20 ]
21);
22 
23const mainWorker :Workerd.Worker = (
24 modules = [
25 (name = "worker.py", pythonModule = embed "./worker.py"),
26 ],
27 compatibilityDate = "2023-12-18",
28 compatibilityFlags = ["python_workers"],
29 bindings = [
30 (
31 name = "MY_ENV",
32 text = "some_value"
33 ),
34 ],
35 # Learn more about compatibility dates at:
36 # https://developers.cloudflare.com/workers/platform/compatibility-dates/
37);