简体   繁体   English

Polymer 3.x,ajax请求(到端口8081)和PHP一起在开发中

[英]Polymer 3.x, ajax requests (to port 8081) and PHP together in development

(sorry my english!) (对不起我的英语!)

Hi. 你好。

I have this question about how to use Polymer Cli during the development, together with Xampp / Apache / PHP for the ajax request. 我有一个关于在开发过程中如何使用Polymer Cli以及Xampp / Apache / PHP用于ajax请求的问题。

Using "polymer serve" while I'm developing, how do I "send" the requests from ajax to the Xampp / Apache / PHP, I want to use during development, but also afterwards when I go into production. 在开发过程中使用“聚合物服务”,如何将来自ajax的请求“发送”到Xampp / Apache / PHP,我想在开发过程中使用它,然后在生产时使用。

If I do a build and put everything in htdoc, I correctly receive the responses of the request. 如果我进行构建并将所有内容都放在htdoc中,则可以正确收到请求的响应。 But while I develop, using the polymer serve (using 8081 port), how do I send the requests to PHP? 但是,在开发过程中,使用Polymer服务(使用8081端口),如何将请求发送到PHP?

...oh god, all is working ...哦,天哪,一切正常

example: 例:

polymer serve --proxy-path services --proxy-target http://localhost/Polymer/3.x/myapp/services 聚合物服务-代理路径服务-代理目标http://localhost/Polymer/3.x/myapp/services

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM