JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 2
  • Score
    100M100P100Q34350F
  • License MIT

Standard Database Orbit for Galaxy Architecture using Drizzle ORM

Package Exports

  • @gravito/orbit-db

Readme

@gravito/orbit-db

The Standard Database Orbit for Galaxy Architecture.

Provides seamless integration with Drizzle ORM.

📦 Installation

bun add @gravito/orbit-db drizzle-orm

🚀 Usage

import { PlanetCore } from 'gravito-core';
import orbitDB from '@gravito/orbit-db';
import { drizzle } from 'drizzle-orm/bun-sqlite';
import { Database } from 'bun:sqlite';

const core = new PlanetCore();
const sqlite = new Database('sqlite.db');
const db = drizzle(sqlite);

// Register the orbit
orbitDB(core, {
  db,
  exposeAs: 'database' // Access via c.get('database')
});

core.mountOrbit('/api', app);

🪝 Hooks

  • db:connected - Fired when the DB orbit initializes.