Giter VIP home page Giter VIP logo

shopify-app-session-storage-mysql's Introduction

  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.

shopify-app-session-storage-mysql's People

Contributors

xiguan00yu avatar

Watchers

 avatar

shopify-app-session-storage-mysql's Issues

Crash while configuring "this.migrator.validateMigrationList(migrationList)"

Describe the bug
A clear and concise description of what the bug is.

To Reproduce
Steps to reproduce the behavior:

  1. Create shopify app with node template
  2. Insall "@link-hooks/shopify-app-session-storage-mysql": "^1.1.2",
  3. Put valid Mysql Credentials with server version 8.2.0

Expected behavior
With shopify node template, when i configure MySqlStore it throws error always.

node_modules/@link-hooks/shopify-app-session-storage-mysql/build/cjs/index.js:251
13:45:29 │ web-backend  │       this.migrator.validateMigrationList(migrationList);
13:45:29 │ web-backend  │                     ^
13:45:29 │ web-backend  │ 
13:45:29 │ web-backend  │ TypeError: this.migrator.validateMigrationList is not a function
13:45:29 │ web-backend  │     at MySQLSessionStorage.initMigrator 
(/home/hassan/projects/uruk/shopify-new-plugin/tfm-express-plugin/node_modules/@link-hooks/shopify-app-session-storage-mysql/build/cjs/index.js:251:21)
13:45:29 │ web-backend  │     at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
13:45:29 │ web-backend  │ 
13:45:29 │ web-backend  │ Node.js v20.11.0

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: Ubuntu 22.04
  • Node version 20.11
  • Code Version: ^1.1.2

Additional context
Add any other context about the problem here.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.