March 2018
Intermediate to advanced
592 pages
13h 44m
English
I'm going to fire up the server using the following command:
node server/server.js
Inside of Postman, we can get started by creating some Todos. Currently, our application and the tests for the application use the same database. The beforeEach method call we ran in the last section unfortunately wiped everything, which means we have no data to fetch. The first thing I'm going to do in Postman is try to fetch the data we should get back an empty array, which should still work. The URL is going to be localhost:3000/todos and it is indeed going to be a GET request. I can click Send, which is going to fire off the request, and we get our data back:
We have an object, we have our todos property, and we have our empty ...