Hey.

Unfortunately, we could not find a guide to install the server.

Who is not difficult to tell the easiest installation option ...

Closed due to the fact that it was off topic by participants aleksandr barakin , Nicolas Chabanovsky July 20 '15 at 7:26 .

It seems that this question does not correspond to the subject of the site. Those who voted to close it indicated the following reason:

  • " Questionnaires are forbidden on Stack Overflow in Russian . To get an answer, rephrase your question so that it can be given an unambiguously correct answer." - aleksandr barakin, Nicolas Chabanovsky
If the question can be reformulated according to the rules set out in the certificate , edit it .

  • one
    Download the installation file from nodejs.org. Install cmd -> node text.js - lampa
  • file created //alert('1');document.write('aa '); C: \ Documents and Settings \ Admin \ 1.js: 2 document.write ('aa'); ^ ReferenceError: document is not defined - zloctb
  • one
    @zloctb is not a browser like this: D Look at what you can work with: nodejs.org/api - lampa
  • Thank you. I have already learned. I read the book rutracker.org/forum/viewtopic.php?t=4212323 - zloctb

2 answers 2

Everything is very simple!

  1. Go to the site
  2. Install the distribution with the 2nd system or launch it in VirtualBox
  3. Do sudo apt-get install nodejs in the terminal
  4. Create a test.js file in which to write console.log ('hello something!')
  5. Do node test.js
  6. See the result!

A purely personal opinion, but if you want to study the node and programming in general, it is better to put something unix-like.

  • @MrFranke What's the difference with nodejs on windows and linux? I have not noticed something yet. - lampa
  • No, nodejs itself works in the same way) The case is surrounded, namely, in the console of Windows. It seemed to me easier for the perception of the console is linux-a, so even when working on Windows, I try to work with nodejs and other server technologies on some external linux server on board, or in an online IDE like cloud9 - MrFranke
  • five
    If the user has a Vendian, then I only consider storing linuh on a virtual machine because of nodejs stupid. - spirit
  • If the user plans to continue to develop in terms of programming, then it’s better to get acquainted with Linux at home and not go into panic at work about what sudo is and how to set up a working environment on the server to work on the project. But this, again, IMHO. But for the sake of one nodejs it’s certainly silly to raise a virtual machine - MrFranke

Download the distribution with nodejs.org and run it. NodeJS installed!

  • I installed it. Now, after Apache, it’s uninterrupted .... Where is localhost ... how to write a website ....? I hope I find out all this from the book. - zloctb
  • 3
    @zloctb is a bit different here, everything is organized. Roughly speaking, you first need to write the web server itself (which broadcasts to the Internet, as well as the Apache), then make the most routing requests yourself. Those. there is a request / node / dir / a string comes to the node Further with this line you can do anything. Here's an example web server var http = require ('http'); http.createServer (function (req, res) {res.writeHead (200, {'Content-Type': 'text / plain'}); res.end ('Hello World \ n');}). listen (1337 , '127.0.0.1'); console.log ('Server running at 127.0.0.1:1337/' ); \ - lampa
  • Thanks lampa .... - zloctb