The first microservice we build will tell us the time at any given location. Let's sketch out how we will build this.
- [Instructor] After the main application…has reached the point where it can call action…based on incoming intent,…it is now time to create the first service.…The time service should return the local time…for a given location.…Earlier on we created a basic express application layout…consisting of a bin/run.js file…and the server/service.js file.…If you'll use the same layout again now,…please use the version you saved earlier,…copy and name it iris-time.…I've prepared it already and placed it on my desktop here.…
Now I'm opening Visual Studio Code again.…Select File, Open,…and I'm selecting this iris-time folder.…Clicking on Open again,…and first let's look into this package.json file.…And here we will also change the package name to iris-time.…Now let's open bin/run.js…and we have to make two changes here, can you spot them?…First, we want to change the port here…in this listen directive, because our main application…already listens on port 3000 so we have to change it here…and I select 3010 here.…
And we should also change the log message here in line 10…
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