Subh
12/09/2021, 11:16 AMSubh
12/09/2021, 11:16 AMgeelen
12/09/2021, 11:16 AM./dist
geelen
12/09/2021, 11:16 AMSubh
12/09/2021, 11:17 AMSubh
12/09/2021, 11:17 AMgeelen
12/09/2021, 11:18 AM.
if you're just interested in running your functionsgeelen
12/09/2021, 11:18 AMgeelen
12/09/2021, 11:18 AMpages dev
Subh
12/09/2021, 11:18 AMfunctions/api/v1/hello.js
this is file path.
would api
in a path create an issue as well?Subh
12/09/2021, 11:22 AMgeelen
12/09/2021, 11:25 AMgeelen
12/09/2021, 11:26 AMSubh
12/09/2021, 11:33 AMSubh
12/09/2021, 11:34 AMSubh
12/09/2021, 11:34 AMnpx wrangler@beta pages dev .
on rootgeelen
12/09/2021, 11:35 AM/hello
?geelen
12/09/2021, 11:36 AMgeelen
12/09/2021, 11:36 AM8788
geelen
12/09/2021, 11:36 AM3000
geelen
12/09/2021, 11:37 AMhttp://localhost:8788/api/v1/hello
geelen
12/09/2021, 11:37 AM/functions
bit is just where the functions live, it's not part of the urlSubh
12/09/2021, 11:41 AMSubh
12/09/2021, 11:41 AMchrisjmccreadie
12/09/2021, 11:49 AMgeelen
12/09/2021, 11:49 AMhello.js
file?chrisjmccreadie
12/09/2021, 11:49 AMSubh
12/09/2021, 11:50 AMexport async function onRequestPost(request) {
return new Response(JSON.stringify(request));
}
chrisjmccreadie
12/09/2021, 11:53 AMSubh
12/09/2021, 11:54 AMexport async function onRequest(context) {
return new Response(JSON.stringify(context));
}
this works
then http://127.0.0.1:8788/api/v1/hello
export async function onRequestPost(request) {
return new Response(JSON.stringify(request));
}
this doesnt work