课程: Learning Full-Stack JavaScript Development: MongoDB, Node, and React

今天就学习课程吧!

今天就开通帐号,24,700 门业界名师课程任您挑!

Node modules

Node modules

- It's important to understand how the module system in node works. We have been using node modules every time we do an import line. The node module system figures out where to find these important modules and it basically has been finding them for us under the node modules folder so far, since everything we used is an external dependency and this is the import syntax that is needed to import something from under node modules, but it's also used to import built-in node modules and node has a few great ones. Take a look at this page here, documenting the node api. Everything in here is available for a node process out of the box. For example, child process is a module that you can use to run a shell command from within node. The cluster module can be used to run and manage multiple instances of a node process for load balancing, for example and many other powerful capabilities. The FS module can be used to make calls…

内容