master | develop |
---|---|
Backend service for Kontent.ai Learn that uses Kontent.ai to fetch content. The service is responsible for indexing API reference.
The service responds to events triggered by the blob storage, after the Reference Preprocessor creates a blob with the preprocessed data. The API reference service processes the data and stores the content ready to index on Algolia in an Azure Blob Storage.
- This project is a TypeScript Azure Functions application.
- It is subscribed to an Azure Event Grid topic and listens for events. Each event contains information about the content that was changed.
- After receiving an event, it fetches the content from the Blob storage.
- The fetched content is then split into smaller Algolia-compatible records.
- Finally the records are stored in an Azure Blob Storage, where the following Indexing Sync service can access it and update the index on Algolia accordingly.
- Node (+yarn) installed
- Visual Studio Code installed
- Subscriptions on MS Azure, Kontent.ai and Algolia
- Open Visual Studio Code and install the prerequisites according to the following steps.
- Log in to Azure using the Azure Functions extension tab.
- Clone the project repository and open it in Visual Studio Code.
- Run
yarn install
in the terminal. - Set the required keys.
- Deploy to Azure using Azure Functions extension tab, or run locally by pressing
Ctrl + F5
in Visual Studio Code.
Azure.StorageKey
- Azure Storage keyAzure.StorageAccountName
- Azure Storage account nameAzure.ContainerName
- Azure Storage container nameAzure.ClearIndexUrl
- URL of thekcd-clear-index
Azure function
- Run
yarn run test
in the terminal.
Feel free to open a new issue where you describe your proposed changes, or even create a new pull request from your branch with proposed changes.
All the source codes are published under MIT license.