Webinar Recording: Node.js Development Workflow in WebStorm
The recording of our February 20th webinar with Adron Hall, Node.js Development Workflow, is now available on JetBrains YouTube Channel.
In this webinar you will learn the basics of working with Node.js web projects in WebStorm. Adron shows how you can run / debug a Node.js app and test it with Mocha.
We would like to address here the most frequently asked questions and those we didn’t have a chance to answer during the webinar.
How to enable Node.js support in IntelliJ IDEA (PhpStorm, PyCharm and RubyMine)?
Make sure that Node.js plugin is installed (Settings | Plugins).
How to enable autocompletion for Express?
Express framework is implemented in a very dynamic way, making it difficult for WebStorm to provide accurate code completion for methods from Express module by just parsing the source code.
How to enable autocompletion for Mocha?
Learn more in this screencast, WebStorm 7 – Integration of Mocha Test Framework.
Here is an explanation:
You can exclude any directory from the project by right-clicking it and selecting Exclude. In this case WebStorm will NOT index this folder, but as a result it won’t resolve methods from these libraries and won’t provide code completion. That’s why we don’t recommend doing it for node_modules folder.
Is it possible to debug a Node.js application that runs remotely? Is it possible to debug when your node and the rest of the dependencies (database, etc.) are running in a VM environment like Vagrant?
You should use a Node.js Remote Debug configuration to connect to the remote debug session. Please have a look at our recent tutorial on running and debugging Node.js applications. Note that you need to run your app in debug mode and configure external access to the debugger on your server (or VM).
Does the debugger support cluster mode?
Yes, just make sure you use Node.js v.0.11 or later.
How can I run only a single test (not the entire test directory)?
Unfortunately, right now WebStorm doesn’t support that. You can vote for this feature request in this YouTrack issue.
What if I have a large project with multiple test directories?
Right now you cannot select multiple test directories in Mocha configuration in WebStorm. You have to create a separate configuration for each test directory.
If you have more questions about Node.js and Mocha, please feel free to ask in comments.
Subscribe to Blog updates
Thanks, we've got you!
Webinar: “New UI for Your IDE: A Glimpse Into the Future”
Join us Monday, October 31, at 5:00 pm UTC (check other timezones) for our live webinar, New UI for Your IDE: A Glimpse Into the Future. In this webinar, join our JetBrains Advocates as they share the New UI with you, giving you a glimpse at some of the visual improvements for IntelliJ Platform IDEs.
Software Development the JetBrains Way: Dogfooding and Other Key Principles
JetBrains has turned 20, and over the years, we've honed methods for development that match the style, values, and needs of our company. These processes work so well for us that we want to share them with others. Dogfooding, for example, has always played a central role in the development of our pro…
Join KotlinConf 2018 Online: Major Kotlin Announcements and Online Q&A
You can meet the JetBrains team at many tech events all over the world. But today we're offering something special – the chance to meet the Kotlin team from the comfort of your own home with KotlinConf 2018 Live. We are happy to invite you to our online event. Join the live stream on October 4-5. …
Join the “GitHub and IntelliJ IDEs” Webinar
GitHub helps teams collaborate around code and work together, and JetBrains IDEs help keep GitHub versioning working productively without switching contexts. Our IDEs also put a pretty face on sometimes cryptic Git commands while preserving the power of high-end versioning productivity. GitHub is…