The application provides integration with the Algolia search engine. It allows you to index your products and search them using Algolia's API.
- Install the dependencies by running the following command in the shell:
pnpm install
-
Create a file named
.env
and use the contents of the.env.example
file as a reference. -
Start the development server by running the following command in the shell:
pnpm dev
-
Search app will be available under
http://localhost:3000
-
Tunnel the app by running:
ngrok http localhost:3000
Note
See How to tunnel an app for more info.
- Go to Dashboard, open the
Apps
tab and clickInstall external app
, provide your tunnel URL with the path for the manifest file. For example${YOUR_TUNNEL_URL}/api/manifest
Here you can find doc how configure the app
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.
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, the 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. RequiresUPSTASH_URL
andUPSTASH_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.