Course lesson

Create a Mock API Endpoint Using Faker and Serverless

Mock APIs are useful for development when you can't use live data for whatever reason.

Duration
11 min
Access
Included
Transcript
Retained from source evidence

Mock APIs are useful for development when you can't use live data for whatever reason.

Faker makes creating mock APIs a straightforward process. In this lesson you'll see how to user Faker to create a generator object for each of a User's properties. Then we'll write a function that goes through each property and run a generate function.

Once we've created our mock API generator, we can use the Serverless framework to generate a Lambda Function and API Gateway so we can access our mock API from a live URL.