Chapter 5: Adding Users and Migrating to Oak
At this point, we have laid the foundations for a web application with a structure that will enable us to add more functionalities as we proceed. As you might have guessed by the name of this chapter, we'll start this chapter by adding the middleware framework of our choice to the current web application, Oak.
Together with Oak, and since our application is starting to have more third-party dependencies, we'll use what we've learned in previous chapters to create a lock file and perform integrity checking when installing dependencies. This way, we can guarantee that our applications will run smoothly without dependency problems.
As we get into this chapter, we'll start understanding how to simplify our code using Oak's features. We'll make our routing logic more extendable but also more scalable. Our first solution was to use if
statements together with the standard library to create a DIY routing solution...