I guess the purpose of your integration is to prevent cross-domain, because if you start a project based on webpack-simple in separate dev mode, the default is 8080, but the default port of json server as a service is 3000, so you want to use this The two services are integrated together, using both dev-server hot loading and the REST api function of json server. If you want to solve this problem, just follow the startup method below in chrome (my system is based on ox-10.11).
open -a Google\ Chrome --args --disable-web-security --user-data-dir
As for another solution to directly integrate the two, it should be more complicated, but I have not tried it.
I guess the purpose of your integration is to prevent cross-domain, because if you start a project based on webpack-simple in separate dev mode, the default is 8080, but the default port of json server as a service is 3000, so you want to use this The two services are integrated together, using both dev-server hot loading and the REST api function of json server. If you want to solve this problem, just follow the startup method below in chrome (my system is based on ox-10.11).
As for another solution to directly integrate the two, it should be more complicated, but I have not tried it.