Weird problem with node.js

Hello everybody,

I'm new to node.js.

I created a new project in WebStorm using the template "Node.js Express App".

Somehow, I can approach from the browser any js file in the project, rather than only those that are in "public" directory. Conversely, the "public" directory is not the root but the main directory which also contains server side directories.
Another weird thing that I think is realated, is that I don't see a process that's called "node.js" on Task Manager and I can still view my project files on browser.

Any ideas?

3 comments
Comment actions Permalink

Not sure I understand what you are talking about... and why it is a problem. What URL do you use to access your javascript files in browser? Note that all your project files are served by webstorm built-in webserver, that returns a content of file available at specified URL - so when you enter URL like http://localhost:63342/project_name/path/to/js/file/file_name.js, it will respond with a file content

0
Comment actions Permalink

See also https://confluence.jetbrains.com/display/WI/Running+and+debugging+Node.js+application for instructions on running/debugging Node.js applications in WebStorm


0
Comment actions Permalink

Thanks a lot Elena!
Now it makes sense!
I asked it also on Stack Overflow and no one there managed to find the problem.

0

Please sign in to leave a comment.