本页还没有译文
本页 7 段还没译成Español,下面显示的是英文原文。Variables and Secrets
还没翻译译自英文(developers.cloudflare.com)本页 7 段都还没译
Bindings
Variables and secrets are bound as follows:
const mf = new Miniflare({
bindings: {
KEY1: "value1",
KEY2: "value2",
},
});Text and Data Blobs
Text and data blobs can be loaded from files. File contents will be read and
bound as strings and ArrayBuffers respectively.
const mf = new Miniflare({
textBlobBindings: { TEXT: "text.txt" },
dataBlobBindings: { DATA: "data.bin" },
});Globals
Injecting arbitrary globals is not supported by workerd. If you're using a service Worker, bindings will be injected as globals, but these must be JSON-serializable.
AI 翻译查看英文原文