doumeng1143 2018-03-06 19:56
浏览 185

如何设置节点js脚本以在PHP cURL中运行?

My problem:

I have a live website in Wordpress(php) and i want to given a user action, i will send a data for a node.js script to run and return the results. So i have this: User Event -> jQuery -> PHP CURL -> NODE.JS -> NODE.JS ANSWER TO CONTINUE PHP SCRIPT.

my question is how i set up a node.js server to run only this specific script, can i do it in my current wordpress server(apache)? or i have to hire a new hosting to have it ?

Please any resource is valid, i don't known if i'm doing the right question on my google search..

Thank you!

  • 写回答

2条回答 默认 最新

  • duanken7168 2018-03-06 20:28
    关注

    Node.js doesn't need dedicated web server like Apache. You should just create a node.js app and then just start it from command line on specific port, for ex. 8080 or 3000.

    You need to have ssh for setting up nodejs. If you are using shared hosting, it might be unavailable. In this case you will need to get VPS/VDS server for it.

    You can check this guide for start: https://nodejs.org/en/docs/guides/getting-started-guide/

    评论

报告相同问题?

悬赏问题

  • ¥15 如何在scanpy上做差异基因和通路富集?
  • ¥20 关于#硬件工程#的问题,请各位专家解答!
  • ¥15 关于#matlab#的问题:期望的系统闭环传递函数为G(s)=wn^2/s^2+2¢wn+wn^2阻尼系数¢=0.707,使系统具有较小的超调量
  • ¥15 FLUENT如何实现在堆积颗粒的上表面加载高斯热源
  • ¥30 截图中的mathematics程序转换成matlab
  • ¥15 动力学代码报错,维度不匹配
  • ¥15 Power query添加列问题
  • ¥50 Kubernetes&Fission&Eleasticsearch
  • ¥15 報錯:Person is not mapped,如何解決?
  • ¥15 c++头文件不能识别CDialog