I
I
IvanGa2018-08-10 15:52:20
Node.js
IvanGa, 2018-08-10 15:52:20

How does Node.js work?

Hello, I want to know how Node.js sites work, but I can't find the information.
I have written many sites in PHP, I understand how it works. Those. the user comes in - all the actions of the script are performed - okay.
But I don’t understand how the node works, because I work on the local and everything works through the console ...
I heard that many sites on the other side work on PHP, a node for socket.io, but how does it all interact with each other?
Can you briefly explain how everything works, if not difficult?
Don't throw stones, please, I really don't understand...

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Anton fon Faust, 2018-08-10
@IvanGa

On a node, you create an http server that constantly listens on some port. Nailed the process - the server is not responding.
Actually, the same thing can be done in php, as far as I remember.
But as a rule, php is run either as an apache module or via fact-cgi

A
Anton Spirin, 2018-08-10
@rockon404

Tyts

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question