Do server actions run on edge?

Thinking about using them in a project but am trying to strictly use edge. Anyone know if they run at edge?
7 Replies
cje
cje2y ago
afaik not by default but its possible to get them there, see https://github.com/vercel/next.js/discussions/49605
GitHub
Edge Server Actions · vercel next.js · Discussion #49605
Summary How can Edge Functions be configured in server actions? "use server"; import { revalidatePath } from "next/cache"; import { db } from "~/db"; import { presses ...
KiKo
KiKo2y ago
Hi this is my issue, havent been able to figure it out yet None of the responses have been helpful to me
cje
cje2y ago
Get in there
Liam
LiamOP2y ago
Wonder if this is the case even if the action exists outside the file (EG: in a actions.ts file)
KiKo
KiKo2y ago
@lermatroid yes that was my dilemma, I was trying to use in a "use server" file and that requires you to only export async functions... which export const runtime = 'edge' is not
Liam
LiamOP2y ago
Yeah, even though its in alpha I really wish some of the docs around server actions were a bit more clear. Does not make a ton of sense atm.
Want results from more Discord servers?
Add your server