> For AI agents: the complete documentation index is available at /llms.txt, the full documentation bundle is available at /llms-full.txt.

# Local Proxy

Modern.js provides a way to configure the development proxy in [`dev.server.proxy`](/configure/app/dev/server.md).

For example, to proxy the local interface to another address:

```ts title="modern.config.ts"
import { defineConfig } from '@modern-js/app-tools';

export default defineConfig({
  dev: {
    server: {
      proxy: {
        // http://localhost:8080/api -> https://example.com/api
        // http://localhost:8080/api/foo -> https://example.com/api/foo
        '/api': 'https://example.com',
      },
    },
  },
});
```
