Faasjs Best Practices

FaasJS best practices - file conventions, defineFunc, database(knex). Use when this capability is needed.

tomevault-io Updated

File contents

Apply these rules when writing or reviewing FaasJS code.

File conventions

See File conventions for:

  • Project structure and special files
  • Route segments and fallback (*.func.ts, index.func.ts, default.func.ts)
  • Verb naming semantics and list endpoint conventions

defineFunc

See defineFunc guide for:

  • When to use defineFunc in *.func.ts files
  • How plugin config from faas.yaml is auto-loaded
  • A complete endpoint example with typed params

Knex

See Knex rules for:

  • Configuring Knex via faas.yaml and using query-builder methods over knex.raw

Related skills


Converted and distributed by TomeVault — claim your Tome and manage your conversions.

tomevault-io/skills-registry/tree/main/faasjs--faasjs-skills--faasjs-best-practices commit 7abcacd9c6

Frequently asked questions

npx skillmds@latest add tomevault-io/faasjs-best-practices