Using with webpack-dev-server

Often time, your web server also hosts some APIs. To mimic this behavior during development, you will need to proxy your client requests to mockit.

webpack.dev.js
module.exports = {
    ...,
    devServer: {
        proxy: {
            '/': 'http://localhost:3000',
        }
    }
};

Last updated