By default, Telefunc uses the URL pathname /_telefunc to communicate between client and server.
You can use config.telefuncUrl to change that URL.
Basic usage
You always need to set the value twice: on the server- and client-side.
On the server-side:
You usually define server-side configs (import { config } from 'telefunc') at your server entry. For example if you use Express.js:
On the client-side:
You can define client-side configs (import { config } from 'telefunc/client') anywhere, just make sure to do it at global client-side code that is always executed. For example /pages/+client.js if you use Vike:
Different domain
If you deploy your frontend and backend at different domain names, then do the following.