'How can I use express-rate-limit in sailsJS?

I want to use a express-rate-limit middleware in sailsJS framework for preventing brute force attacks/ adding attempts for logging in. The documentation shows the implementation for basic nodejs but how can we add that logic in sailsjs framework. I referred to the following doc:

https://www.npmjs.com/package/express-rate-limit



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source