Hosting Nodejs in Cpanel- Enter to the virtual environment - node.js

what does these command means?
Secondly my nodejs RestAPI is working fine with local machine - but not working once i deploy it to server using nodejs cpanel.
Local postman
while in actual server getting "Cannot GET /apps/api/product/all" -- where my domainName/apps represents "Application URL" in the Cpanel.

little advice....push your project to git then pull it to your server. all dependencies on your machine will be ignored then in the server you can run install updated packages and compatible with your servers Operating system then start the server. fixes most of the version dependency problems you will keep facing. This is the ideal concept not a straight answer

Related

Troubles deploying Nodejs API with Hapi on Azure and Repl.it

I'm using Hapi to run an API testing deployment on different platforms.
First of all I tried Heroku and everything worked fine.
Then I tried to run on Azure Web Apps and it failed with an error
"Hello all.
I'm using Hapi to run an API testing deployment on different platforms.
First of all I tried Heroku and everything worked fine.
Then I tried to run on Azure Web Apps and it failed with an error that error:
First I thought it was some error particular to Azure, but now I'm trying to run on Repl.it and got caught with the same error.
Is it specific to Hapi?
I'm using Yarn to manage my dependencies.
I faced the same issue when I tried to test Hapi on my cloud container before.
For my case, there has compatibility issue between Hapi version (I used v19.1.1) and Node version (my server default version 10.16.0).
The issue is resolved after I upgrade the Node version to 12.16.1 LTS.

Node server is mandatory to deploy in IIS?

I have compiled my code using typescript and run it in my laptop using node server.
Now when i deploy it in windows IIS server in another machine, do i require node server that machine?
Node is just for development and not for hosting?
Can you clarify my doubts?
YES. you need node server in the other machine as well in the machine in which you are deploying the code
As far as I know, if you want to host node.js application, you should firstly install the node.exe and the a build of iisnode.
https://nodejs.org/en/#download
https://github.com/tjanczuk/iisnode
After installed the IIS nodes, you could set up samples, from the administrative command prompt call %programfiles%\iisnode\setupsamples.bat.
Then you could go to http://localhost/node to see the example.
More details, you could refer to below article:
https://www.hanselman.com/blog/InstallingAndRunningNodejsApplicationsWithinIISOnWindowsAreYouMad.aspx

Installing Node.js on browser server

I'm building a multiplayer game with node.js and socket.io and uploading it to itch.io. I can install node.js on my windows computer but how do I install it on the server that I'm using? Thanks!
The server that you would be using for deploying and running your app is just another machine(with OS) at a remote location- hence a remote server!
Now coming to your question- what you need to connect, install and run node.js on your server is a SSH client such as Putty (http://www.putty.org/).
You download and run putty on your windows machine and then enter your server's Hostname/IP-address. You will be able to see your server's terminal window once connected. Now you can go ahead and install node.js in it. Depending upon which operating system your server machine is running, you can install node.js accordingly.
Also, you probably want to transfer your project files that you created using node.js and Socket.io - for that you will need an FTP client such as FileZilla (https://filezilla-project.org/).
Once all that is done and your project is running- you can host it on your given website.

Run artifactory on browser

I installed artifactory on linux server. I want to know how to check whether it is properly installed.
Secondly, I want to use it's user interface on google chrome. From where I can get SERVER_DOMAIN and PORT number for it's url from installed files on server?
Thanks in advance.
Your question is a bit vague.
How did you installed it (ZIP, RPM, Docker, Deb...)?
Which database you used (default, Oracle, MySQL etc..)? You can see if the server is up and running by running the following REST API from the machine you have installed it on:
curl -iuadmin:password localhost:8081/artifactory/api/system/ping
Regarding the IP, this can be checked by running 'ifconfig' on the linux server and get the IP of that machine.
Artifactory by default is running on port 8081, unless you changed it.
It seems that you will need to follow the basic installation wiki:
https://www.jfrog.com/confluence/display/RTF/Installing+Artifactory

How to deploy node js in windows server 2012

I have a Windows 2012 server and hello world node js file (Only one js file along with Node_module folder).
Now I need to deploy it to the windows server and need to run it globally.
How to do that? Please help me!
I have read more article. But confused. I installed Node app on the server. I ran it locally. It is working. But How to do it globally. (www.xxxx.com/ABC)
You have two options:
iisnode. There are a few more configuration steps with this option, but there seems to be additional benefits.
allow port through Windows Firewall, the post is self explanatory.
iisnode
Some resources:
https://github.com/projectkudu/kudu/wiki/Using-a-custom-web.config-for-Node-apps
I picked up a few pointers from Hosting Node.js Applications on Windows Server 2012, Complete with Git Deployment and Remote Debugging - Part 2

Resources