node js process name on windows - node.js

I'm new to Node.js
I created a node js sample project on WebStorm11 using the "Node.js Express App" template.
I added an html file and just opened it on browser and it worked.
My question is how I know what process on Windows is managing the requests to my application? I want to stop it through Task Manager.
Besides, I tried to stop the process by typing ctrl+c in command line and it didn't work. Any suggestions why?
Any help will be profoundly appreciated!

Seems you didn't run your Express application, did you? Opening HTML file in browser, well, just opens it on WebStorm default built-in webserver, it doesn't start your Express server. Please see https://confluence.jetbrains.com/display/WI/Running+and+debugging+Node.js+application for instructions on running Node.js applications in WebStorm

Related

node.js express won't open in browser

I can open a browser page with HTML/CSS & it works, but when I type in the code for node.js then click on Go Live, the files show up but no message or any network traffic. I updated everything. I even copied & pasted the code from Node.js for the express server but it won't load to the browser. this is all that shows up.
Your help will be greatly appreciated!
Go live (with VSCode Live Server Extension) and running your server with Node.js are two different things.
Check Node.js getting started documentation (Link)

How to launch html file (with css and js files included) on remote server on node.js with angular 2

I started working with Angular 2 and have one issue.
I compiled my app for production through "ng build" and got an index.html and other files like js and css in this folder.
I need to publics them on web
Im using remote ubuntu on digital ocean.
I found this nice script, which solved a problem, but to enter a project I need to print in a browser a path like this: somehost:8080/index.html.
Can you help please and explain please, how I can use a path like somehost:8080, or just somehost:8080/index, but without a file extension? I found of course, even simpler scripts, but they dont serve js and css, which are included.
And next question, actually main, is this decision the most elegant to provide an entrance to the app, or there is a better and smarter way? Afterwards, Im thinking about PM2, because all that I need is to launch it like a linux service and to reload the app, if it will be crashed.
Thanks!

Debug node.js web application that has been launched via a Gulp task

I have a web application that is written in node.js and gets started using a gulp command. When the application first starts, before the server is running, debug points may be hit in WebStorm (or in any IDE or command line tool). However, after the server is running and I go to the interface in my localhost I can no longer hit debug points inside the application. This is not being caused by client side code as the debug points are in server code.
I have read the answers that involve using the node-inspector and that has not solved my problem because of configuration files that are not getting read when starting the debugger in node inspector.
I'm a bit surprised that there is so little on here about this issue. Is it not a normal problem that other developers face? Thanks in advance for the help.
My workaround for this may not be sufficient for every case. I was modifying JavaScript files and didn't actually need the configuration files, after loading, to be able to test my changes. I did the following:
Wrote a line in my app.js file that set the variables I needed. (these would have been tasks ran in Gulp)
I then started the app as a Node.js app and was able to debug it as normal.
If any of my views had been updated, or anything else that was being managed by Gulp, then I could have simply stopped the server, started it again via the Gulp command, and then stopped again and restarted as a Node.js app.
This did not solve the issue in my OP but it was a good enough workaround to get debug points in the JavaScript.

JXCore quitting socket.io/express server strait after starting it?

I created a basic socket.io express server from the Docs' on socket.io's website, but when I package the jS file and etc into the .jxp file, running it just returns the terminal prompt.
ozziepeck11$ jx server.jx
ozziepeck11$
Whereas Node will run it fine, can I adapt my code to work with JXCore or is JXCore just not designed for this? But it would be pretty pointless.. The multithreading feature of JXCore would make a socket.io/express server so much better.

How do i work with node.js in my local machine window xp

I want to integrate chat system by using PHP,node.js and socket.io. For this I have installed node.js in my local windows xp (node-v0.8.19-x86.msi) and when i click the node.js icon from start bar it showing just like command mode with ">". My question is what is next step, where should i write my code and how it connect with php and how to embed socket.io.
or need any more step to complete the node.js installation process?
Please help me, i am first in node.js and socket.io
when i click the node.js icon from start bar it showing just like command mode with ">".
This is the node.js interpreter, you don't need to run it to run a node.js server.
First of all, create a folder where you want to write you server code, access this folder from the command line and use NPM to install Socket.IO
For example, lets say that you created the folder "MyNodeServer":
C:\MyNodeServer> npm install socket.io
This will create the node_modules folder inside your project folder and install the last version of socket.io into it.
Now you can start building your server, actually, if you want to connect from your client to your node/socket.io server you don't really need PHP in the middle, Socket.IO is serving its socket object file to your client. If you want to build a chat server, here is a tutorial I wrote few month ago, using node.js, socket.io and jquery in the client side:
http://udidu.blogspot.co.il/2012/11/chat-evolution-nodejs-and-socketio.html
And here you can download this chat project:
https://github.com/uditalias/chat-nodejs
Goodluck!

Resources