B
B
BuzzyMan2018-10-03 14:50:04
PHP
BuzzyMan, 2018-10-03 14:50:04

Running NodeJS from PHP on Windows, what's the catch?

Good afternoon!
I am working on a project in Laravel + Vue, it became necessary to use Server Side Rendering.
I installed a package that just does this, it pulls a node call from php with a script passed to it, the result is returned as a string.
The problem is that local development is on Windows and if you run it manually in the console,
node js/ssr.js
then everything works without problems, but if you do it using PHP itself, then the script hangs stupidly.
Even banal

exec('node -v');
shell_exec('node -v');

They lead to the same result - everything hangs stupidly. What is the problem?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
I
Inclusive, 2018-10-03
@Inclusive

Why fence crutches? PHP has an extension from V8.
https://medium.com/js-dojo/server-side-rendering-w...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question