The microservice will now be connected to the main application and start answering questions asked over Slack.
- View Offline
- [Instructor] When we left the main Iris application,…we had already created a timeintent route.…Now all that is left is to call iris-time from there.…We're still here in iris-time.…The only thing I do is…I make sure that it is actually running…because we want to access the service then.…Now in Visual Studio Code, I select File, New Window,…and from there I select Open.…
And I open Iris.…Here we go.…Now let's open the timeintent.…And we want to use a SuperAgent here…to call our iris-time service so I add const…request equals require('superagent').…Now here instead of returning just this placeholder message…we remove that and first let's store the location here…into variable location equals…intentData.location.value.…
Next we want to call this service we just created,…so it will request, it's a get request…and we use back ticks here and we call…http://localhost…on port 3010/service.…And here we now add the location object we just stored…with a dollar and curly brackets.…
The callback now is again e6 error function…
After explaining some basics about Node.js and microservices, Daniel shows you how to sketch out the planned architecture for your application and get the boilerplate code, modules, and credentials in place. Next, he shows how to create a bot user in Slack, connect to Slack, and post messages. He also shows you how to get your bot to process variations in text by creating logic that delegates the processing of intent to dedicated modules. Lastly, he shows how to register additional services and he covers how to use monitoring to identify architectural or performance issues.
- Using Slack APIs
- Sketching out a Slack bot architecture
- Setting up a project and choosing modules
- Creating and naming your bot
- Connecting to Slack
- Setting up and using natural language processing
- Routing by intents
- Implementing geocoding and time calculation
- Adding and monitoring services