11 lines
243 B
TypeScript
11 lines
243 B
TypeScript
import { followerSubject } from "$lib";
|
|
import { produce } from "sveltekit-sse";
|
|
|
|
export function POST() {
|
|
return produce(async function start({ emit }) {
|
|
followerSubject.subscribe((follower) => {
|
|
emit("message", follower);
|
|
});
|
|
});
|
|
}
|