Skip to content
File

Blob: samples/pyodide-fastapi/config.capnp

795 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);
17 
18const mainWorker :Workerd.Worker = (
19 modules = [
20 (name = "worker.py", pythonModule = embed "./worker.py"),
21 (name = "fastapi", pythonRequirement = ""),
22 (name = "anyio", pythonRequirement = ""),
23 ],
24 bindings = [
25 (
26 name = "secret",
27 text = "thisisasecret"
28 ),
29 ],
30 compatibilityDate = "2023-12-18",
31 compatibilityFlags = ["python_workers"],
32 # Learn more about compatibility dates at:
33 # https://developers.cloudflare.com/workers/platform/compatibility-dates/
34);