Socket
Book a DemoInstallSign in
Socket

@grammyjs/storage-psql

Package Overview
Dependencies
Maintainers
0
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@grammyjs/storage-psql

PSQL storage for grammY library.

latest
Source
npmnpm
Version
2.5.1
Version published
Weekly downloads
60
-59.46%
Maintainers
0
Weekly downloads
 
Created
Source

PSQL storage adapter for grammY

Storage adapter that can be used to store your session data in PostgreSQL when using sessions.

Installation

Node

npm install @grammyjs/storage-psql pg --save

Deno

import { PsqlAdapter } from "https://deno.land/x/grammy_storages/psql/src/mod.ts";
import { Client } from "https://deno.land/x/postgres@v0.19.2/mod.ts";

Usage

You can check examples folder

Vendor Examples

Vercel Postgres (Neon)

import { createClient } from "@vercel/postgres";
import { PsqlAdapter } from "@grammyjs/storage-psql";

const client = createClient();

await client.connect();

bot.use(
  session({
    storage: await PsqlAdapter.create({ tableName: 'sessions', client }),
  })
);

FAQs

Package last updated on 27 Feb 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts