# @arendajaelu/postgresql-app-session

> Shopify App Session Storage for PostgreSQL with bugfixing

Latest version **1.0.4** (published 2023-02-01) · MIT license · 0 weekly downloads

## Install

```sh
npm install @arendajaelu/postgresql-app-session
pnpm add @arendajaelu/postgresql-app-session
yarn add @arendajaelu/postgresql-app-session
bun add @arendajaelu/postgresql-app-session
```

## Health

**Score 20/100 (F)** — status: abandoned.

Positive: has types; no vulnerabilities.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.4 |
| Published | 2023-02-01 |
| First published | 2023-02-01 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 4 |
| Unpacked size | 76.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Arendaja Elu |
| Maintainers | arendajaelu |
| Keywords | shopify, postgre, session, shopify-app-session-storage-postgresql |

## Links

- npm: https://www.npmjs.com/package/@arendajaelu/postgresql-app-session
- Repository: https://github.com/arendajaelu/postgresql-app-session-for-shopify
- Homepage: https://github.com/arendajaelu/postgresql-app-session-for-shopify#readme
- Issues: https://github.com/arendajaelu/postgresql-app-session-for-shopify/issues
- npm.io page: https://npm.io/package/@arendajaelu/postgresql-app-session

## Dependencies (4)

- [pg](https://npm.io/package/pg.md) ^8.8.0
- [tslib](https://npm.io/package/tslib.md) ^2.4.0
- [@shopify/shopify-api](https://npm.io/package/@shopify/shopify-api.md) ^6.1.0
- [@shopify/shopify-app-session-storage](https://npm.io/package/@shopify/shopify-app-session-storage.md) ^1.0.2

## Alternatives

- [localforage](https://npm.io/package/localforage.md) — 6.2M weekly downloads
- [localforage-observable](https://npm.io/package/localforage-observable.md) — 30.8K weekly downloads
- [@y/y](https://npm.io/package/@y/y.md) — 30.1K weekly downloads
- [@metaobjectsdev/render](https://npm.io/package/@metaobjectsdev/render.md) — 3.5K weekly downloads
- [@ledgerhq/coin-algorand](https://npm.io/package/@ledgerhq/coin-algorand.md) — 1.1K weekly downloads

## Recent versions

- 1.0.4 (latest) — 2023-02-01
- 1.0.3 — 2023-02-01
- 1.0.1 — 2023-02-01
- 1.0.0 — 2023-02-01

## README

# postgresql-app-session-for-shopify
Shopify App Session Storage for PostgreSQL with bugfixing

This package fixed two potential issues:

1. Add “CREATE TABLE IF NOT EXISTS” into the createTable function
2. Amend the field "scope" from varchar to text (supports over 255 chars in app scope)


# Session Storage Adapter for PostgreSQL

This package implements the `SessionStorage` interface that works with an instance of [PostgreSQL](https://www.postgresql.org).

```js
import {shopifyApp} from '@shopify/shopify-app-express';
import {PostgreSQLSessionStorage} from '@shopify/shopify-app-session-storage-postgresql';

const shopify = shopifyApp({
  sessionStorage: new PostgreSQLSessionStorage(
    'postgres://username:password@host/database',
  ),
  // ...
});

// OR

const shopify = shopifyApp({
  sessionStorage: PostgreSQLSessionStorage.withCredentials(
    'host.com',
    'thedatabase',
    'username',
    'password',
  ),
  // ...
});
```

If you prefer to use your own implementation of a session storage mechanism that is compatible with the `@shopify/shopify-app-express` package, see the [implementing session storage guide](../shopify-app-session-storage/implementing-session-storage.md).

---
_Source: https://npm.io/package/@arendajaelu/postgresql-app-session · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
