Step 7 » Now We can check some complete example site. Disable firewall ( Iptables ) » ~]# service iptables stop ~]# chkconfig iptables off if you are not getting the page, Disable Iptables service on your server. sample]# node test.js Server running at port 2000 Step 6 » Now your test application is running on port 2000. Step 5 » Now run the code using node command. ~]# mkdir sample ~]# cd sample sample]# vim test.js Add the below code to that file.( About the code )Ĭonsole. Create a directory (optional □ ) and a file. Step 4 » Let’s try a “hello world” web application. ~]# node > console.log("Hello world") Hello world undefined Great!! your installation is perfect. Now check your installation with a simple “hello world” example in the command prompt. ~]# yum install npm -enablerepo=epel Step 3 » That’s it, installation is over. ~]# rpm -ivh Step 2 » Now start installing node.js and dependencies. Find the latest release file from EPEL 6 repository and install using rpm command. Step 1 » You need to enable EPEL repository which contains node.js packages and dependencies. Let’s start, Installing node.js on centos 6 is very simple. In this article, we can see about installing node.js on centos 6 and running a sample application. it uses an event-driven function which is very useful for hosting real-time applications. Node.js is a platform that works on V8 JavaScript Engine.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |