From afbc599a981269684ec65d14d005a6dc7cc18c5d Mon Sep 17 00:00:00 2001 From: Lyric <5h3ll3x@gmail.com> Date: Mon, 24 Jun 2024 18:31:27 +0900 Subject: [PATCH] feat: Add fetch method to default export in entry/index.js --- entry/index.js | 6 ++++++ entry/package.json | 11 +++++++++++ 2 files changed, 17 insertions(+) create mode 100644 entry/package.json diff --git a/entry/index.js b/entry/index.js index d1b18805..afe2696e 100644 --- a/entry/index.js +++ b/entry/index.js @@ -24,3 +24,9 @@ async function forwardToVtp(request, env) { async function forwardToPortal(request, env) { return await env.portal.fetch(request) } + +export default { + async fetch(request, env) { + return handleRequest(request, env) + } +} \ No newline at end of file diff --git a/entry/package.json b/entry/package.json new file mode 100644 index 00000000..15277321 --- /dev/null +++ b/entry/package.json @@ -0,0 +1,11 @@ +{ + "name": "1000h-entry", + "version": "1.0.0", + "description": "", + "main": "index.js", + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "author": "", + "license": "AGPLv3" +}