Node.js is a JavaScript-based platform, is an increasingly popular, lightweight, and efficient option for developers. It allows coders to use JavaScript on both the front-end and the back-end thanks to Google’s awesome V8 engine.
-Install Xcode.
-Install git.
-Run the following commands:
git clone git://github.com/ry/node.git cd node ./configure make sudo make install
With Aptitude package manager one can install the package nodeJS then edit their bash config to redirect the command node
to node js
. sudo apt-get update sudo apt-get install nodejs sudo apt-get install npm nano (edit / vim) the file ~/.bashrc and add the line: alias node="nodejs"
Simply install from official repos: sudo yum install nodejs npm If that fails, enable EPEL repo:
curl --silent --location https://rpm.nodesource.com/setup | bash -
Then simply install from repo:
yum -y install nodejs
In portage tree:
emerge nodejs
In official repo use pacman package manager:
pacman -S nodejs npm
-Install the dependencies ( Below example using debian apptitude package manager): g++ curl libssl-dev apache2-utils git-core build-essential
sudo apt-get install g++ curl libssl-dev apache2-utils git-core build-essential
-Run the following commands:
git clone git://github.com/ry/node.git
cd node
./configure
make
sudo make install
Interested in mastering Node.js Training? Enroll now for FREE demo on Node.js Training.
setup.exe
in the cygwin folder to install the following packages:
-devel → openssl
-devel → g++-gcc
-devel → make
-python → python
-devel → git
-Open the cygwin command line withStart > Cygwin > Cygwin Bash Shell
. -Run the below commands to download and build node.
git clone git://github.com/ry/node.git
cd node
./configure
make
sudo make install
var http = require('http');
http.createServer(function (req, res) {
res.writeHead(200, {'Content-Type': 'text/plain'});
res.end('Hello Node.js\n');
}).listen(8124, "127.0.0.1");
console.log('Server running at http://127.0.0.1:8124/');
node
command line utility:
> node hello_node.js
Server running at http://127.0.0.1:8124/
Now, if you navigate to http://127.0.0.1:8124/ in your browser, you should see a nice message.You liked the article?
Like: 0
Vote for difficulty
Current difficulty (Avg): Medium
TekSlate is the best online training provider in delivering world-class IT skills to individuals and corporates from all parts of the globe. We are proven experts in accumulating every need of an IT skills upgrade aspirant and have delivered excellent services. We aim to bring you all the essentials to learn and master new technologies in the market with our articles, blogs, and videos. Build your career success with us, enhancing most in-demand skills in the market.