OAuth can, of course, be manually configured and controlled, but we stand on the shoulders of giants for good reason. It is much easier for us to make use of an already built OAuth library. Fortunately, node has such a library, creatively called OAuth. Even with this library, you'll see that interacting with an OAuth 1.0a endpoint is complicated. To install it, drop to the command line again and use the node package manager:
npm install oauth
This library can perform both OAuth 1.0a and OAuth 2.0 operations. As Twitter is an OAuth 1.0a endpoint, we'll be making use of that.
The first thing to do is set up our Express application. Express provides application templates, but they are an overkill for the simple application in this chapter. If ...