📚 Event Engine Daemon

Quick Start

Get started running plugins inside an event-sourced daemon process.


1. CLI Execution

You can run the daemon directly from the command line:

npx event-engine-daemon --db ./var/events.db --plugins @sullux/event-engine-files-plugin

CLI Flags

FlagDefaultDescription
--db <path>./events.dbFile path to persistent SQLite database
--plugins <list>""Comma-separated list of plugin package names or paths
--log-level <lvl>infoLogging verbosity (debug, info, warn, error)

2. Programmatic Supervisor Execution

const { createDaemon } = require('@sullux/event-engine-daemon')

const main = async () => {
  const daemon = createDaemon({
    databasePath: './events.db',
    plugins: [
      require('@sullux/event-engine-files-plugin'),
      require('@sullux/event-engine-schedules-plugin'),
    ],
  })

  // Start the supervisor loop
  await daemon.start()

  console.log('Daemon supervisor started successfully.')
}

main()