Immersive reader is a Microsoft Azure cognitive services tool to help a user's ability to understand content on a page. It's a single API call which displays a dialog containing the page content and a range of reading options including highlighting nouns, verbs and adjectives.
Read the article Using Azure to help users with lower levels of literacy for more information.
Follow these instructions to create an immersive reader resource and configure Azure active directory authentication.
- Run the provided script that will create an Immersive Reader resource and configure Azure Active Directory (Azure AD) authentication.
- Run the
Create-ImmersiveReaderResource
powershell function using the below details:
Create-ImmersiveReaderResource -SubscriptionName '<PARAMETER_VALUES>' -ResourceName '<PARAMETER_VALUES>'
-ResourceSubdomain '<PARAMETER_VALUES>' -ResourceSKU '<PARAMETER_VALUES>'
-ResourceLocation '<PARAMETER_VALUES>' -ResourceGroupName '<PARAMETER_VALUES>'
-ResourceGroupLocation '<PARAMETER_VALUES>' -AADAppDisplayName '<PARAMETER_VALUES>'
-AADAppIdentifierUri '<PARAMETER_VALUES>' -AADAppClientSecret '<PARAMETER_VALUES>'
-AADAppClientSecretExpiration '<PARAMETER_VALUES>'
Replacing <PARAMETER_VALUES>
with your own values.
This is a Node.js Express server which handles routing and API calls to Microsoft Azure for active directory authentication and immersive reader capability. DOTENV is used to manage environment variables locally.
- run
npm i
to install all dependencies - Run
yarn run start
(ornodemon start
if you want to view changes you make after doing a browser refresh) - Open a web browser and navigate to http://localhost:3000 to view the sample
git push
triggers an automatic deployment to Heroku
The AADAppClientSecretExpiration token expires on 2022-06-01
.
The configuration variables need to set in Heroku to mirror the environment variables in the solution (not committed to repository).