JSPM

  • Created
  • Published
  • Downloads 1823
  • Score
    100M100P100Q134111F
  • License MIT

Shopify App Session Storage for PostgreSQL

Package Exports

    This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@shopify/shopify-app-session-storage-postgresql) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

    Readme

    Session Storage Adapter for PostgreSQL

    This package implements the SessionStorage interface that works with an instance of PostgreSQL. Tested using PostgreSQL v15

    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: new PostgreSQLSessionStorage(
        new URL('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.