WS Debugging

This commit is contained in:
Julien Valverdé
2024-07-17 03:26:44 +02:00
parent af9baa3e9a
commit 52f7c5cc4b
4 changed files with 20 additions and 13 deletions

View File

@@ -51,6 +51,15 @@ const main = Effect.gen(function*() {
const mode = yield* ServerConfig.mode
const todos = yield* TodoRepository
// yield* Effect.fork(
// todos.todos.changes.pipe(
// Stream.runForEach(values => Effect.gen(function*() {
// yield* Console.log("Todos updated:")
// yield* Console.log(values)
// }))
// )
// )
yield* todos.add(new Todo({
id: Option.none(),
order: 0,

View File

@@ -12,7 +12,7 @@ export interface TRPCClientProviderProps {
export function TRPCClientProvider({ children }: TRPCClientProviderProps) {
const [queryClient] = useState(new QueryClient())
const [wsClient] = useState(createWSClient({ url: "/" }))
const [wsClient] = useState(createWSClient({ url: "ws://localhost:8069" }))
const [trpcClient] = useState(trpc.createClient({
links: [