tls-devicer
    Preparing search index...

    Function createSqliteAdapter

    • Create a AsyncTlsStorage backed by a SQLite file via better-sqlite3.

      The adapter creates the tls_snapshots table automatically on the first call to init().

      Parameters

      • dbPath: string

        Path to the SQLite database file, e.g. "./tls.db". Use ":memory:" for tests.

      Returns AsyncTlsStorage

      An AsyncTlsStorage instance. Call init() before any other method.

      const adapter = createSqliteAdapter('./tls.db');
      await adapter.init();
      await adapter.save({ deviceId: 'dev1', timestamp: new Date(), profile: {} });