feat: Add fetch method to default export in entry/index.js

This commit is contained in:
Lyric
2024-06-24 18:31:27 +09:00
parent 9f0007242f
commit afbc599a98
2 changed files with 17 additions and 0 deletions

View File

@@ -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)
}
}

11
entry/package.json Normal file
View File

@@ -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"
}