Ok,
So i Found cgi-nodejs and i quote installation process,Introduction JavaScript (
Node.js) is becoming one of the most popular languages. For some reason today we are still using different languages to develop server side logic than client/browser logic. For example PHP on the server side and JavaScript on the browser. Why not use a single language!!!! You can share code and libraries between client and server. JavaScript is an extremely powerful language but can be tricky to use. With proper commenting and documentation the lack of structure in JavaScript can be remedied.
This tutorial will show you how to install Node.js on one of the most populate Hosting Sites,
GoDaddy.com under cPanel. This tutorial should work under any web hosting provider as long as they support custom CGI (Common Gateway Interface).
Let's get started.
Download Required FilesDownload Node.jsDownload the latest Node.js 64-bit Linux Binaries (.tar.gz) from
http://nodejs.org/download/. For this beginner tutorial we will only need /bin/node file inside the downloaded tar file.
Download CGI-Node.jsDownload the latest CGI-Node.js from
http://www.cgi-node.org/downloads. You can download the optimized version or the development version. Either will work but the optimized version will give you extra milliseconds on load time.
Rename the the downloaded file to cgi-node.js , open it and replace the first line <accountname> with your GoDaddy account name.Configure GoDaddyAccess cPanel and File ManagerLog into your GoDaddy account and launch the cPanel found under WEB HOSTING.
NOTE: This has only been tested with GoDaddy cPanel hosting and not the legacy hosting which they are trying to phase out.
Select "File Manager" to open the "Web Root (public_html/www)". make sure "Show Hidden Files (dotfiles)" is selected as well and hit "Go".
Upload cgi-node.jsSelect the "cgi-bin" folder under the "public_html" then click on "Upload"
This part is very
IMPORTANT: make sure the file Permissions is 755 (provide Execute permissions to User, Group, and World) before uploading the file.
IMPORTANT NOTE: You will get an Apache error if the file permissions is not 755.
If you forget to change the permissions then you upload the file you can change them later but it is not covered under this tutorial.Upload Node.jsNow let's upload the downloaded "node" file that we extracted from "node-v0.xx.xx-linux-x64.tar". As of version v0.10.32, the file was around 11MB in size.
Navigate to "/home/<accountname>/bin" folder. Where <accountname> refers to your GoDaddy root home folder.
Ensure that the permissions is set to 755 like before and upload the "node" executable to the bin folder.
IMPORTANT NOTE: the path to this file must match the first line path in cgi-node.js otherwise you'll get an Apache error.
Adding .htaccessIf you don't already have a ".htaccess" file within public_html then create one. Open ".htaccess" file for editing.
Add the following lines within the file.
Action cgi-node /cgi-bin/cgi-node.js AddHandler cgi-node .jscript
NOTE: your script extensions do not have to be ".jscript" they can be whatever you want them to be as long as your server side executable scripts have the same extensions.
NOTE: only the entry HTTP request files must have this extension. You can include .js or .jscript files within your code.
We are done, let's test out the script.Test CGI-NodeCreate a new file within the public_html folder called cgiNodeInfo.jscript and add the following code within it. cigNodeInfo() function is does exactly what phpInfo() does, it outputs all the server, environment and request information to the output stream.
<? cgiNodeInfo() ?>
Save the file and navigate to it within your browser and you should see the following:
If you get an error or have any comments let me know. (Comment below)
CGI-Node is still in development and we'd appreciate any feedback or comments to make this module better.For issue tracking and reporting go to the following link:
https://github.com/UeiRicho/cgi-node/issuesI know, this is for Cpanel, its not for CWP. But developer width right skill can make it happen.
i tray and create some directories and put files by instruction, and it work, i got a 500 internal server.... and does not work at all. so CAN somebody to tray??? Maybe its error when uploading files as root not like a user