July 2018
Intermediate to advanced
354 pages
8h 51m
English
Before you can host the API using json-server, you need the source data file. This is where the faker module is helpful. Creating enough data for a realistic test environment has always been one of my top challenges. Today, it seems like there are libraries or tools like faker available for most platforms.
Since I use Node.js for the majority of my projects, faker stands out as a powerful tool. It just requires a script to generate the data. This script is in the /utils folder, generate-fake-data.js:

This script helped me not only generate the file data set, but also allowed me to continually modify the source data as the overall ...
Read now
Unlock full access