Skip to content

Functions

ɳSelf includes a serverless runtime for running custom backend logic close to your data.

CapabilityDescription
HTTP triggersRun functions on HTTP requests
Event triggersRespond to Hasura database events
Cron triggersSchedule functions on a cron expression
TypeScript/JavaScriptNode.js runtime
Terminal window
nself service enable functions
nself build && nself restart

Or set in .env:

FUNCTIONS_ENABLED=true
VariableDescriptionDefault
FUNCTIONS_ENABLEDEnable Functions servicefalse
FUNCTIONS_PORTInternal port3000

Place function files in your project’s functions/ directory. ɳSelf mounts this directory into the Functions container automatically.

my-project/
└── functions/
├── hello-world.ts
└── send-email.ts

Functions are available at: https://functions.your-domain.com/v1/{function-name}

Configure event triggers in the Hasura console or via Hasura migrations to call functions when database rows are inserted, updated, or deleted.


Home | _Sidebar