nodejs, expressjs serving PHP files

后端 未结 3 1026
花落未央
花落未央 2021-01-05 19:43

Ok I\'ve been playing around with nodejs, expressjs and socket.io to create some applications. But now im coming to the stage where i want to take things a bit further.

相关标签:
3条回答
  • 2021-01-05 19:56

    Uh, skip PHP entirely and integrate everyauth into your app.

    0 讨论(0)
  • 2021-01-05 20:09

    PHP-EXPRESS should do. Just install the package and follow the docs.

    https://www.npmjs.com/package/php-express

    0 讨论(0)
  • 2021-01-05 20:12

    As already noted, node.js itself won't interpret php files for you. Available options are:

    • have nginx in front of node and reverse proxy all request you want to process in node from it
    • proxy php requests from node to php-capable server
    • spawn php process on each request in node
    • make fastcgi link to php-fastcgi using node fastcgi protocol parser
    0 讨论(0)
提交回复
热议问题