@node-telescope/storage-postgres
v0.1.1
Published
PostgreSQL storage backend for Node-Telescope using pg
Downloads
162
Maintainers
Readme
@node-telescope/storage-postgres
PostgreSQL storage driver for Node Telescope.
Install
npm install @node-telescope/storage-postgresUsage
import { telescope } from '@node-telescope/express';
import { PostgresStorage } from '@node-telescope/storage-postgres';
const storage = new PostgresStorage('postgresql://user:pass@localhost:5432/mydb');
await storage.initialize();
app.use(telescope({ storage }));The initialize() call creates the required tables automatically. Uses JSONB columns and connection pooling for production workloads.
With NestJS
import { PostgresStorage } from '@node-telescope/storage-postgres';
@Module({
imports: [
TelescopeModule.forRootAsync({
useFactory: async () => {
const storage = new PostgresStorage('postgresql://user:pass@localhost:5432/mydb');
await storage.initialize();
return { storage };
},
}),
],
})
export class AppModule {}Documentation
See the main Node Telescope README for full documentation.
License
MIT
