1.1.1 • Published 5 years ago
json-server-mocky v1.1.1
Api Server Mock
All you need to do is to create a data schema, pass it to the exposed method, and you are up and running.
DATA_SCHEMA: describe the shape of the data.
FILE_LOCATION: location where the will be created.
FILE_NAME: Name of the file.
API_PORT: Port for the mocked api.
import { startServer } from 'json-server-mocky';
.....
startServer(DATA_SCHEMA, FILE_LOCATION, FILE_NAME, API_PORT);