Take It for a Drive
The tests are passing but we have not yet run the app as a server, though we did have to run the mongod database process, but only for the tests for the model. We’ll explore end-to-end testing, from the UI down to the database, later in the book. In the interim, having designed the server-side code, leaving it with the tests running is rather unsettling. We can’t celebrate the efforts until we see the fruits of the efforts run as a true Express app. We need one more thing before that can happen; let’s take care of that small bit.
We designed the db.js file, the model functions in model/task.js, and the routes in routes/tasks.js. The routes are all wired to a handful of path suffixes, but we need to assign a prefix to the ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access