Answer the question
In order to leave comments, you need to log in
How to use node.js ?
The problem is that I don’t understand how to run it, the fact is that there is a server.js file where to shove it, it’s also not clear. For tests I use Denver.
For example, I launch Denver, I create a site folder, for example demo.ru, inside the www folder, then the site files, I launch the site, but I can’t figure out how to use node.js, I downloaded the node.js file from the site, installed it on a PC, I have windows OS 8.1 pro.
Explain to the noob in more detail how to run the very first script on the site demo.ru.
Answer the question
In order to leave comments, you need to log in
Please read this link, everything is here www.nodebeginner.ru/#hello-world (in short, I’ll say that apart from the node, you don’t need Apache Denver, etc. Start reading from the heading Simple HTTP server ).
About where to shove: wherever you want. you can also in different folders, the main thing is that you run it all 1 time in the console).
English:
Main answer https://stackoverflow.com/questions/2353818/how-do... Related
to your problem:
www.nodebeginner.org/#hello-world
www.nodebeginner.org/#building-the-application -stack
I hope everything is ok with English :)
There is an English book online Node Up and Running
If Apache and node are together:
stackoverflow.com/a/18604082
arguments.callee.info/2010/04/20/running-apache-an...
Node.js projects don't require an external server like Denver.
To run the script, you just need to install Node.js, go to the console in the folder with the project and run the command. node SCRIPT_FILENAME
Perhaps before starting it will be necessary to install the dependencies by runningnpm install
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question