Let's modify the time microservice to subscribe to the main application as soon as it has started up.
- [Instructor] Before we proceed,…I want to say a word about security.…I'm assuming that Iris and it's services are on…a secure and safe network, and trustworthy.…In real life scenarios, you would at least…require some authentication token…or use some sophisticated authentication…methods, like a wall.…In any case,…you should secure your API end points.…We will now modify our time service so that…it announces itself to Iris.…With that, I've already opened its run test file,…and to send announcement, we will use super agent again.…
So on top of run.gs, we add…const…request…equals…require super agent.…We want to announce ourselves to the main implication…as soon as the service is started up and listening.…So let's use the on listening event handle…that we already created.…In there, right after this console.log we have here,…we will add a declaration of a function and…we will call it announce,…so we add const announce equals parentheses,…it's an E6 arrow function again…and in the function body we want to request…and in this case, a put request…
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