Edit

disableNamingConvention

Environment: server.

Opt out of the naming convention for event-based telefunctions (removes all related warnings).

// Environment: server
 
import { config } from 'telefunc'
 
config.disableNamingConvention = true

Opting out of the naming convention is perfectly fine, though we recommend having a clear reason for doing so.

We recommend reading Guides > Event-based telefunctions before opting out. It explains why event-based telefunctions lead to increased:

  • Development speed
  • Security
  • Performance

Feel free to reach out if you have questions.

You usually define server-side configs (import { config } from 'telefunc') at your server entry. For example:

// /server/index.js
// Environment: server
 
import { config } from 'telefunc'
 
const app = express() // If you use Express.js
const app = new Hono() // If you use Hono
// ...
 
// Server configs can be set here
config.someServerSideSetting = 'some-value'
// /server/index.ts
// Environment: server
 
import { config } from 'telefunc'
 
const app = express() // If you use Express.js
const app = new Hono() // If you use Hono
// ...
 
// Server configs can be set here
config.someServerSideSetting = 'some-value'

See also