How to set up koa2 + koa2-router + react + webpack + koa2-cors proxy cross-domain?

currently want to use koa2 to build a middle-tier agent,

tried:

    koa2-cors
    koa2-proxy-middleware
    koa-server-http-proxy
    koa-better-http-proxy
    

install demo configuration, which doesn"t work at all. The
front end uses an axios request. I would like to ask who has successfully set up, please recommend an example.


backend:

 // app.js
const Koa = require("koa")
const app = new Koa()
const cors = require("koa2-cors")

app.use(cors({ origin: "*" }))

// 

app.listen(8080)

Front end:

const axiosIns = axios.create({
    baseURL: "http://localhost:8888",
    timeout: 1000,
    headers: {
        "Access-Control-Allow-Origin": "*"
    }
})

axiosIns.post("/")
Menu