Newbie stuck on step 2

Hi,

I am an experienced C/C++/Objective-C developer, but a total web/Javascript newbie. I just downloaded WebStorm to learn that stuff.

I chose to create a new projet with existing files, using the last option, "Source files are in a local directory". Indeed I don't have a server. I chose the directory where I had previously downloaded sample code for a book I'm using.

I can open one of the first sample .htm files in WebStorm fine.

It breaks down when I want to open it in a browser. I tried Firefox and Chromium, with the same result.

My project root is: ~/Professional-Javascript.
The path of the file I want to open is: ~/Professional-Javascript/Ch03/TypeOfExample01.htm.

The URL that Firefox is asked to open is: http://localhost:63342/Professional-Javascript/Ch03/TypeofExample01.htm

The error I get: is "Connection to localhost failed"

Indeed, I don't understand why WebStorm added a port number when I don't have a server, why it doesn't pass the full path of my file, and above all why a "file://" url?

When I manually enter the URL: file:///Users/jdmuys/Professional-Javascript/Ch03/TypeofExample01.htm, Fireworks open the correct file, and I can see the result.

I suppose this is a simple project setup issue, but I couldn't find anything in the Preferences that would ring a bell. I could not find a single actual tutorial from JetBrain on WebStorm, where by "tutorial", I mean one oriented to the newcomer, that takes you from start to finish, step by step, holding your hand.

Thanks for your suggestions.

I am using WebStorm 8.0.4 on MacOS X 10.9.5.

Please do not suggest I run an actual web server unless this is absolutely necessary: I only want to learn Javascript. At this point anyway.

2 comments
Comment actions Permalink
Indeed, I don't understand why WebStorm added a port number when I don't have a server, why it doesn't pass the full path of my file, and above all why a "file://" url?


WebStorm tries to open your file on its built-in web server that  serves the project from http://localhost:<built-in server port>/<project root> (see http://confluence.jetbrains.com/display/PhpStorm/Using+the+Built-in+Webserver+in+PhpStorm for more info)
Default built-in server port is 63342. Not sure why connection is not established - do you get the same error when using Chrome? do you have Chrome extension installed (http://confluence.jetbrains.com/display/PhpStorm/Live+Edit+in+PhpStorm#LiveEditinPhpStorm-ChromeExtensionInstallation)
If you like to open your file using file:// protocol, try holding Shift when opening a file via View/Open in browser or via browsers bar in the editor

0
Comment actions Permalink

Yes I get the same error with Chrome and Chromium.

However, I had not tried Safari. And it works with Safari.

Investigating, I managed to make it work:

It turns out that I had a proxy set up (in the MacOS X "Network" control panel) according to my employer requirements. Turning that proxy off would make the feature work using the built-in web server.
Knowing that, I managed to fix the problem by adding localhost in the bypass list of the proxy.

I have no idea why the proxy did *not* prevent Safari from working before I changed the bypass list.

In hindsight, I think I should have thought of that. I guess being such a newbie led me to make wrong assumptions.




Also opening with shift works fine to open with the file:/// protocol. Thank you.



Thank you for your help.

Jean-Denis
0

Please sign in to leave a comment.