1. 15
    Setup a Mock API Server with the json-server npm module
    1m 35s

Setup a Mock API Server with the json-server npm module

InstructorAndy Van Slaars

Share this video with your friends

Send Tweet

In this lesson we’ll install json-server as a dependency of our project so we can explore making API calls in a Redux-friendly way. We’ll update the scripts in package.json to allow us to run the server and verify it is responding by issuing a curl command.

bradwoods.io
~ 7 years ago

How come you didn't add json-server package to dev dependencies?

Andy Van Slaarsinstructor
~ 7 years ago

How come you didn't add json-server package to dev dependencies?

Because for this particular example, we deploy the entire thing to a server in the last video and json-server is part of the "production" deployment. Not something I would use for a real production app, but getting into setting up a real server was beyond the scope of this course.

Alex Cassell
~ 6 years ago

Copy and paste and using a setup that cuts off half of the code. Good job!

Andy Van Slaarsinstructor
~ 6 years ago

Copy and paste and using a setup that cuts off half of the code. Good job!

The lesson includes a link to the code. Here is the direct link to that file:

https://github.com/eggheadio-projects/egghead_react_redux_course/blob/15-json-server/db.json