Skip to content

Latest commit

 

History

History
78 lines (48 loc) · 3.09 KB

README.md

File metadata and controls

78 lines (48 loc) · 3.09 KB

Saleor App Data importer

Data Importer uses [Nuvo](https://www.getnuvo.com/) to batch import customers data to Saleor from sources like CSV or Excel

How to use this project

Requirements

Running app in development mode

  1. Install the dependencies by running the following command in the shell:
pnpm install
  1. Create a file named .env and use the contents of the .env.example file as a reference.

  2. Set you NEXT_PUBLIC_NUVO_LICENSE_KEY in .env. Here you can find how to get the key

  3. Start the development server by running the following command in the shell:

pnpm dev
  1. Data importer app will be available under http://localhost:3000

  2. Tunnel the app by running:

ngrok http localhost:3000

Note

See How to tunnel an app for more info.

  1. Go to Dashboard, open Apps tab and click Install external app, provide your tunnel URL with the path for the manifest file. For example ${YOUR_TUNNEL_URL}/api/manifest

How to use

Here you can find doc how to use the app

Generated schema and typings

Commands build and dev would generate schema and typed functions using Saleor's GraphQL endpoint. Commit generated folder to your repo as they are necessary for queries and keeping track of the schema changes.

Learn more about GraphQL code generation.

Storing registration data - APL

During the registration process, Saleor API passes the auth token to the app. With this token, the App can query Saleor API with privileged access (depending on permissions requested during installation). To store this data, app-template uses a different APL interface.

The choice of the APL is done using APL environment variable. If the value is not set, FileAPL is used. Available choices:

  • file: no additional setup is required. Good choice for local development. Can't be used for multi tenant-apps or be deployed (not intended for production)
  • upstash: use Upstash Redis as storage method. Free account required. Can be used for development and production and supports multi-tenancy. Requires UPSTASH_URL and UPSTASH_TOKEN environment variables to be set

If you want to use your own database, you can implement your own APL. Check the documentation to read more.

Learn more about Saleor Apps

Apps guide

Configuring apps in dashboard