1.1.2 • Published 1 year ago

@link-hooks/shopify-app-session-storage-mysql v1.1.2

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

fork @shopify/shopify-app-session-storage-mysql

  1. update mysql version

  2. change create mysql connect method

Session Storage Adapter for MySQL DB

This package implements the SessionStorage interface that works with an instance of MySQL.

import {shopifyApp} from '@shopify/shopify-app-express';
import {MySQLSessionStorage} from '@shopify/shopify-app-session-storage-mysql';

const shopify = shopifyApp({
  sessionStorage: new MySQLSessionStorage(
    'mysql://username:password@host/database',
  ),
  // ...
});

// OR

const shopify = shopifyApp({
  sessionStorage: MySQLSessionStorage.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.