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("/")
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1c23086-32dbb.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1c23086-32dbb.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?