N
N
nepster-web2014-04-27 06:04:19
PHP
nepster-web, 2014-04-27 06:04:19

sockjs + node.js bundle, is there a place for php?

There is a page where data is constantly updated in real time.
Now this is implemented using the js library for working with events and it works quite crookedly. Namely, not on all computers, why I don’t know. But it doesn't matter.

I want to work with sockets and use sockjs + node.js to send data to the client.
Here the question arises, I already have the api I need in php and I would like to do the following thing:

We have a client that establishes a connection with node.js. In order not to rewrite my api to node.js, will it be correct, for example, to make a get request from node.js to php, receive data and send it back to the client?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
M
Mark, 2014-04-27
@printf

It's better to destroy the proxy, in my opinion.

K
Konstantin Kitmanov, 2014-04-27
@k12th

This is a perfectly legitimate practice, HTTP is just as much a protocol for communication between machines as it is between machines and humans.

D
DDanya, 2014-04-27
@DDanya

This will be the most acceptable option. True, usually from PHP to Node.JS.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question