Customize the build-in server's document root using in-place server

I'm having a very painful experience trying setting up the appropriate root directory for WebStorm's built-in server, to resolve absolute URLs to the project root.

I don't understand if it's my workflow that's wrong here or else, an alternative I was using were relative paths. Other than being really ugly, they need special attentions when dealing with compiled files (for example, urls in scss files have to be written relative to the "compiled css" folder, nasty!). Not manageable.

If I use absolute paths that take in account WebStorm's choice of document root, the urls will be broken when the project is served.

The common solutions (best explained here and there) make use of in-place servers. I wasn't able to make them work, the document root is still "a level above the project dir".

web server url: http://font-atlas-generator:63342/

local path: D:\Users\Nemo\OneDrive-shared\web\font-atlas-generator\

web path: /

What am I supposed to do? I've read the documentation (especially here) but I couldn't get any useful info

Here's a sceenshots: Upload id: 2020_08_22_NEA1hTF77B1xcAkB (file: 1.PNG)

Thank you

0
2 comments

The trick with hosts file doesn't work anymore, please follow WEB-38141 for updates.

The built-in web server can't be configured in Preferences | Build, Execution, Deployment | Deployment. It always serves files from your project folder, and web server URL is http://localhost:63342/<project_name>

1

Thank you, I've posted a comment, but those issues look forgotten. I wonder is WebStorm is still a viable option to do some work in 2020.

Sad to see glorified text editors take all the spotlight, but this ide's presence on the web is almost non-existent anymore. Resources are either very old (2014-), or PHPStorm related. A full fledged ide is so useful to who doesn't do web development regularly, and has not built a practical toolset yet, it's nice to leverage the ide to do some work. (like file watchers, if I can manage to get them working).

In any case I don't have much to say, given that I got the ide for free, as a student. I'm very thankful for that. Your're assembling armies of JetBrains-accustomed programmers c:

0

Please sign in to leave a comment.