You usually define server-side configs (import { config } from 'telefunc') at your server entry. For example if you use Express.js:
// /server/index.js// Environment: serverimport express from 'express'import { config } from 'telefunc'const app = express()// Config values can be set hereconfig.someServerSideSetting = 'some-value'
Monorepo
If you have a monorepo structure, then set config.root to the root directory of your client-side (i.e. the root of Vite/Vike/Next.js/Nuxt/...). Don't set config.root to the monorepo root, nor to the root directory of your server. (The config.root setting enables Telefunc to match your .telefunc.js files/imports between the server-side and the client-side.)