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 ads仿真结果在圆图上是怎么读数的
  • ¥20 Cotex M3的调试和程序执行方式是什么样的?
  • ¥20 java项目连接sqlserver时报ssl相关错误
  • ¥15 一道python难题3
  • ¥15 用matlab 设计一个不动点迭代法求解非线性方程组的代码
  • ¥15 牛顿斯科特系数表表示
  • ¥15 arduino 步进电机
  • ¥20 程序进入HardFault_Handler
  • ¥15 oracle集群安装出bug
  • ¥15 关于#python#的问题:自动化测试