mockit
  • mockit
  • Installation
  • Setup
  • Fixture
  • APIs
  • CLI
  • Advance
    • Typescript
    • Creating a custom server
    • Integrating with other tools
    • Using with webpack-dev-server
    • mockit.json
Powered by GitBook
On this page
  1. Advance

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',
        }
    }
};
PreviousIntegrating with other toolsNextmockit.json

Last updated 6 years ago