Article
home/blog/Loading

Proxy requests using Webpack

Using webpack you can proxy requests from one directory eg http://localhost:8080/profile to another address.

Proxy example

devServer: {
    proxy: {
        "/profile" : "http://localhost:5000"
    }
}

Why its useful

This is useful if you need to direct your frontend project to hit a resource on a different server

<img src="./profile"></img>