Creating a custom server

Instead of tying you down to mockit, you can also create your own server and use mockit's core functionalities.

Creating your own custom server

server.js
import express from 'express';
import mockit from '@builtwithluv/mockit';

const app = express();

mockit(app);

app.get('/my-own-endpoint', (req, res) => res.json({ hello: 'world' }));

app.listen(3000);

Creating your own custom endpoints will not be detected on mockit's client. However, your custom endpoints will be reachable.

Last updated