While I have a server address just in case, how shall I know if the server running node.js?! Even more, iis or apache?
Is there any way to configure the running service on the server?
While I have a server address just in case, how shall I know if the server running node.js?! Even more, iis or apache?
Is there any way to configure the running service on the server?
2
Answers
To check the node server running by logging in to the system
If you are using
linux
system then the easiest way is to check the process of the node service usingpidof node
which will give you the process of the node service if it is running.In windows you can simply go to the
Task Manager
and check fornode
in the application list. If it is there then it is running in the machine.To check node server from the server address
There is no default page or URL that node server provides from which you can know that node is running on that server by using the Public IP address or domain name. If you want to setup anything such then you can create a
/status
GET route that will be a public route and it will return you the uptime of the server. Something like this:Where
process.uptime()
will return the time from where the server is started. Thus, you can run the URL like192.168.10.10:3000/status
(or with public IP) to check if the server is running node or not. Note that this works only when you have your own NodeJS API as you will be adding this additional/status
GET route in your project.You can do this in linux:
You can use ps-node to configure your services and running processes