So far, we have tested and automated all of our HTML, CSS, and JavaScript jobs. However, all of it was frontend code. In this chapter, we are going to add some backend. We will use Node.js and MongoDB, so it will still be JavaScript. However, it will still be quite an undertaking. In our current HTML code, we have copied and pasted the entire header and search bar, but when we have a backend, we can generate HTML using a template engine. Since we are using Node.js, we can reuse our shopping-cart.js file with some slight modifications. Also, we are currently minimizing all of our code using Gulp, and hence, in using a backend, we may be able to minimize our code on the fly and have it cached.
After we have hauled over our website, so it uses a proper backend, we can run our tests to see if everything still works. However, we may have to change our tests...