It is tempting to look for modules for every simple task in an application. But what implications can this have?
- [Narrator] Node.js offers a lot modules via…the Node package manager NPM.…You will find a module for almost everything.…And you might feel tempted to use a lot…of such third party cultural to your project.…But adding a module always means…that you trust some other person…that they have done it right,…didn't introduce security problems,…and will maintain this module in the future as well.…Just recently, a huge number of applications…were effected when a module called left-pad had a problem.…Let's look into the source code of left-pad.…
We see that left-pad is just a few lines of code,…and just really trivial.…Why would you want to take the risk of an external…dependency for just a few lines of code?…While working on a project, you should always ask yourself…if you really need a module,…or if you should better write the piece of code yourself.…If you have to use a module, be sure that the author…has some credibility, and that they're a frequent…leases, and no old non-answered issues on GitHub.…In our project we want to use the slack API…
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