-
Notifications
You must be signed in to change notification settings - Fork 21
Open
Description
from #19
--
I could see that being an alternate configuration for 2-3 built-in backends. The existing method of configuration would still work for power users, but passing a string would use a backend with default configuration:
Zero config
Possibly defaults to sqlite backend so no external service is needed to start using OpenWorkflow:
const ow = new OpenWorkflow();Backend string option
Looks for OPENWORKFLOW_BACKEND_DB environment var:
const ow = new OpenWorkflow({ backend: 'postgres' }); // or { backend: 'sqlite' }Backend option (current)
Customize backend with other options (like namespaceId) or use community backend:
const backend = await BackendPostgres.connect(postgresUrl);
const ow = new OpenWorkflow({ backend });As far as tree-shaking (relevant to serverless environments), the backend string is a runtime config and wouldn't be able to tree-shake. But the backends are very minimal so not a big concern.
Originally posted by @nathancahill in #19 (comment)
Metadata
Metadata
Assignees
Labels
No labels