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
cje12mo 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
KiKo12mo ago
Hi this is my issue, havent been able to figure it out yet None of the responses have been helpful to me
cje
cje12mo ago
Get in there
Liam
Liam12mo ago
Wonder if this is the case even if the action exists outside the file (EG: in a actions.ts file)
KiKo
KiKo12mo 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
Liam12mo 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.