- Node.js Web Development
- David Herron
- 239字
- 2021-06-11 18:48:18
Exploring Node.js Modules
Modules and packages are the building blocks for breaking down your application into smaller pieces. A module encapsulates some functionality, primarily JavaScript functions, while hiding implementation details and exposing an API for the module. Modules can be distributed by third parties and installed for use by our modules. An installed module is called a package.
The npm package repository is a huge library of modules that's available for all Node.js developers to use. Within that library are hundreds of thousands of packages you can be used to accelerate the development of your application.
Since modules and packages are the building blocks of your application, understanding how they work is vital to your success with Node.js. By the end of this chapter, you will have a solid grounding in both CommonJS and ES6 modules, how to structure the modules in an application, how to manage dependencies on third-party packages, and how to publish your own packages.
In this chapter, we will cover the following topics:
- Definitions of all types of Node.js modules and how to structure both simple and complex modules
- Using CommonJS and ES2015/ES6 modules and when to use each
- Understanding how Node.js finds modules and installed packages, so you can better structure your application
- Using the npm package management system (and Yarn) to manage application dependencies, to publish packages, and to record administrative scripts for the project
So, let's get on with it.
- SQL Server 從入門到項目實踐(超值版)
- 深度學(xué)習(xí)經(jīng)典案例解析:基于MATLAB
- R語言數(shù)據(jù)可視化之美:專業(yè)圖表繪制指南
- OpenCV for Secret Agents
- 人人都是網(wǎng)站分析師:從分析師的視角理解網(wǎng)站和解讀數(shù)據(jù)
- 從Excel到Python:用Python輕松處理Excel數(shù)據(jù)(第2版)
- Getting Started with NativeScript
- Rust游戲開發(fā)實戰(zhàn)
- Django 3.0應(yīng)用開發(fā)詳解
- 軟件測試綜合技術(shù)
- Android應(yīng)用開發(fā)實戰(zhàn)
- C語言從入門到精通
- Python程序設(shè)計教程
- 川哥教你Spring Boot 2實戰(zhàn)
- R語言與網(wǎng)站分析