This example provides instructions to clone and configure the repository that contains the code required to synchronize data between Elastic Path Commerce Cloud and Algolia, and use webhooks to synchronize data.
- Ensure that you have an account in the ngrok service to tunnel your development environment externally.
- Ensure that yarn and other dependencies are installed.
To clone repository, run the following command:
git clone https://github.com/moltin/examples.git
In the terminal, go to the
Go to Algolia and do the following:
Create an account.
Create a new app with a name.
Go to Settings > API Keys.
Make a note of your Application ID and Admin API Key.
/sync-catalog-to-algoliadirectory, create an
.envfile and add the keys for the following environment variables:
Use any value that you want for
Run the following command and start the development server:
By default, the server starts on port 3000. If the server starts on a different port, use that port number in the next step.
Start ngrok using the following command:
ngrok http 3000
This exposes port 3000 externally.
Go to the ngrok status page and make a note of the URL.
Create a new integration in Commerce Manager by doing the following:
Log into the Commerce Manager.
Go to Settings > Integrations.
Click New Integration.
In the Integration details section, enter a name and description for your integration.
We recommend to prefix the name with
DEVELOPMENTfor easier referencing.
In the Configuration section, enter the ngrok URL and a secret key.
In the Observes section, select the following options in *Category and Collection: