try with 2 prerendering routes
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
{
|
||||
"runtime": "nodejs20.x",
|
||||
"handler": "index.js"
|
||||
}
|
||||
"runtime": "nodejs22.x",
|
||||
"handler": "router.js",
|
||||
"launcherType": "Nodejs"
|
||||
}
|
||||
|
||||
@@ -1,3 +0,0 @@
|
||||
export default async (req, res) => {
|
||||
return res.send("hello world");
|
||||
};
|
||||
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"type": "module"
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
import { default as gist } from './core-app/api/gist.js'
|
||||
import { default as pin } from './core-app/api/pin.js'
|
||||
|
||||
export default async (req, res) => {
|
||||
const url = new URL(req.url, 'https://localhost')
|
||||
req.query = Object.fromEntries(url.searchParams.entries())
|
||||
switch(url.pathname) {
|
||||
case '/gist':
|
||||
gist(req, res)
|
||||
break
|
||||
case '/pin':
|
||||
pin(req, res)
|
||||
break
|
||||
default:
|
||||
res.statusCode = 404
|
||||
res.end('Not Found')
|
||||
break
|
||||
}
|
||||
}
|
||||
@@ -1,3 +1,5 @@
|
||||
{
|
||||
"expiration": 5
|
||||
"expiration": 5,
|
||||
"bypassToken": "r3fr3shT0k3n",
|
||||
"passQuery": true
|
||||
}
|
||||
+1
@@ -0,0 +1 @@
|
||||
api.func
|
||||
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"expiration": 5,
|
||||
"bypassToken": "r3fr3shT0k3n",
|
||||
"passQuery": true
|
||||
}
|
||||
+1
@@ -0,0 +1 @@
|
||||
api.func
|
||||
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"expiration": 5,
|
||||
"bypassToken": "r3fr3shT0k3n",
|
||||
"passQuery": true
|
||||
}
|
||||
Reference in New Issue
Block a user