Skip to content

Latest commit

 

History

History
67 lines (43 loc) · 1.94 KB

File metadata and controls

67 lines (43 loc) · 1.94 KB

Azure Cognitive Search UI

This sample is a React template for Azure Cognitive Search. It leverages Azure Functions as the backend to communicate with Azure Cognitive Search and QnA Maker.

Screenshot of sample web app

Running the application locally

To run the sample locally, follow the steps below.

Prerequisites

Setup

  1. Clone (or Fork and Clone) this repository

  2. Open the Azure Function project CustomSkillForDataIngestion\CustomSkillForDataIngestion.sln in Visual Studio

  3. Add a local.settings.json file to the project

The local.settings.json file holds all of the keys that the application needs and should include the following json:

{
  "IsEncrypted": false,
  "Values": {
    "FUNCTIONS_WORKER_RUNTIME": "dotnet",

    "AzureWebJobsStorage": "DefaultEndpointsProtocol=https;AccountName={StorageAcountName};AccountKey={StorageAccountKey};",
    "StorageAccountName": "",
    "StorageAccountKey": "",
    
    "SearchServiceApiKey": "",
    "SearchServiceName": "",

    "QnAMakerEndpoint": "",

  },
  "Host": {
    "CORS": "*"
  }
}

Run the Azure functions

  1. Run the Azure functon project in visual studio

Running the front-end

  1. Install front-end dependencies...

    npm install
  2. Run the front-end project in the browser (automatically opens a browser window).

    npm start

The react project will pull the URL for the Azure functions from the .env file. If you'd like to run the front-end locally with the deployed Azure Functions, update the credentials in the .env file.