Setup
Setting up mockit
Running mockit
is a fairly straight forward process:
Create fixtures
By default, mockit
will scan files ending in .fixture.js
under<rootDir>/mockit
for fixtures. You can configure this in mockit.json
(See Advance for more details).
fixture.js
By default, mockit
will assume this is a GET
request with status of 200
and content-type of application/json
. Of course, you can configure this (see Fixture for more details).
Done!
Now, all you need to do is start the server. On your terminal, run npx mockit start
. Your mock server will be hosted on http://localhost:3000
while the client will be served on http://localhost:3000/mockit
.
Found an issue? Please let us know!.
Last updated