Best Project Structure

I've created Nodejs project in WebStorm and I'm wondering the best way to set up the ContentRoots. When the project is created it is given a single project root, the problem with this is that root relative references in the html pages do not work. So if I have

<script src="/javascript/vendor/jquery-2.0.0.js"></script>

in my html page and I want auto completion on the src (hit ctrl+space) while typing then I don't get any completions).

To get the completions I've removed the single root and added 'node_modules', 'public', 'routes' and 'views' as individual content roots. This now gives me completion but I'm wondering if this will lead to problems further down the road.

I'm really looking for best practice here,


Kevin Jones

Please sign in to leave a comment.