Home  >  Q&A  >  body text

javascript - How to build json server with vue webpack-simple template?

How to build json server in webpack-simple template?

ringa_leeringa_lee2696 days ago1079

reply all(1)I'll reply

  • 扔个三星炸死你

    扔个三星炸死你2017-06-26 10:53:03

    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.

    reply
    0
  • Cancelreply