Skip to content

Latest commit

 

History

History
39 lines (27 loc) · 1.27 KB

README.md

File metadata and controls

39 lines (27 loc) · 1.27 KB

@moltin/node-storage-adapter

npm version semantic-release code style: prettier

A storage adapter for node-localstorage and the JS SDK. Requires JS SDK v4.0.0.

🛠 Installation

Install the package from npm and import to your project.

npm install --save @moltin/node-storage-adapter

⛽️ Usage

Moltin JS SDK

import { gateway as MoltinGateway } from '@moltin/sdk'
import NodeStorageAdapter from '@moltin/node-storage-adapter'

const Moltin = MoltinGateway({
  client_id: 'XXX',
  storage: new NodeStorageAdapter('./localStorage')
})

Moltin JS Request Library

import { MoltinClient } from '@moltin/request'
import NodeStorageAdapter from '@moltin/node-storage-adapter'

const Moltin = new MoltinClient({
  client_id: 'XXX',
  storage: new NodeStorageAdapter('./localStorage')
})