Answer the question
In order to leave comments, you need to log in
What are the differences between NodeJS server and LAMP?
At the moment I am developing a game in which a certain amount of data needs to be stored on the server. Initially, I was going to use the LAMP stack for my purposes, but then I thought that I would rather use JavaScript, i.e. NodeJS, as I programmed in JS for more than a year, and in PHP for 1 week, and then I abandoned this idea (not because the PL is bad, but I just lost my enthusiasm for learning it). However, I managed to deploy a local server, and even made a couple of AJAX requests to it, but I haven’t worked on NodeJS yet, now I’m studying it and some questions have already appeared.
In PHP, everything is simple, you just make a request to a PHP file and get a response, but with NodeJS everything is more complicated. First, I write node filename.js in the console, it starts the server on some port, and I already start getting the results of executing the code, but do I have to do the same on VDS? Those. I write somewhere in the console of the admin panel of my server node filename.js and the server will work around the clock and return a response when requested on a certain path? (i.e. if the game made a request, say to mysite.com/getHello, then the application will receive the string "Hello, World" in response).
And it turns out that since the server will be without a LAMP stack, then I lose the ability to configure via .htaccess?
Answer the question
In order to leave comments, you need to log in
Here, the approach to development and deployment needs to be explained a bit:
LAMP is a stack of technologies: Linux, Apache, MySQL, PHP.
node.js is a technology.
In order for a remote server to communicate with the outside world, web servers are used: nginx / Apache / IIS, etc. Further requests pass to a programming language. It is best to use frameworks. And then, requests are processed (requests are made to the database, communication with the file system, etc.).
If you say that it is more convenient for you to work with JS, then I advise you this approach:
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question