export const api = experimental_createTRPCNextAppDirClient<
typeof expressRouter
>({
config() {
return {
links: [
// loggerLink({
// enabled: (op) => true,
// }),
experimental_nextHttpLink({
batch: true,
url: "http://localhost:3002/trpc",
// fetch(url, options) {
// return fetch(url, {
// ...options,
// credentials: "include", tried
// });
// },
// headers() {
// return {
// "x-trpc-source": "client",
// "Access-Control-Allow-Origin": "*", tried
// };
// },
}),
],
};
},
});
export const api = experimental_createTRPCNextAppDirClient<
typeof expressRouter
>({
config() {
return {
links: [
// loggerLink({
// enabled: (op) => true,
// }),
experimental_nextHttpLink({
batch: true,
url: "http://localhost:3002/trpc",
// fetch(url, options) {
// return fetch(url, {
// ...options,
// credentials: "include", tried
// });
// },
// headers() {
// return {
// "x-trpc-source": "client",
// "Access-Control-Allow-Origin": "*", tried
// };
// },
}),
],
};
},
});