V
V
Valery Osipov2016-08-12 22:15:34
JavaScript
Valery Osipov, 2016-08-12 22:15:34

How to set up Webstorm for NodeJS Express?

Zero knowledge of NodeJS.
JavaScript at the "write a term paper in computer science" level.
Resharper and IntelliJ IDEA are spoiled.
I really miss autocomplete with parameter types and built-in documentation for Ctrl+Q.
I'm trying to write a NodeJS-Express + MongoDB REST service for learning. If you copy-paste from examples, everything is fine, but there is not enough confidence in the code. Autocommit appears only after the first use of the function, and then - at the level of its name.
Is it possible to simplify life, or will everyone have to learn in a notebook fashion?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
B
bromzh, 2016-08-12
@Namolem

Can make life easier

Yes. You can write jsdoc, webstorm can parse them and extract types. Or you can use https://flowtype.org/
However, this will only help for your code. In order to have a normal autocomplete for third-party libs, you can connect files with types (.d.ts) for each of the libraries on the libraries tab. Here is a video
The best option is to write everything in TypeScript. And files with types for plug-in libraries are easily connected through the typings npm module. With the right settings, webstorm will prompt very accurately.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question