

JavaScript is an event-driven language, so anything that happens on the web server generates a non-blocking opportunity. Simply put, -Node.js is a method for executing JavaScript on the web server but it is also much, much more. Node.js is a JavaScript V8 runtime user interface and agile JavaScript interpreter. Response.end("Node webserver running\n") Ĭonsole.log("Node.Check How you can install Node.js & Npm on Amazon ec2 Ubuntu Linux Var server = http.createServer(function (request, response) )

Create a file called server.js and edit the contents of the file : nano server.js.

Again, let's use /tmp as our working directory. This this prurpose we'll configure and runs a simple webserver. The best method to test Node.js is actually run an application. Sudo ln -s /usr/local/bin/npm /usr/bin/npm Sudo ln -s /usr/local/lib/node /usr/lib/node If by any chance, your are in the root environment and the previous command returns " -bash: node: command not found", you can fix this by creating the following symbolic links : sudo ln -s /usr/local/bin/node /usr/bin/node You can verify afterwards if the installation was successful by checking the versions of node and npm : this may take a while, especially the compiling part.
