- 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.
- 樂學Web編程:網站制作不神秘
- Java EE 7 Performance Tuning and Optimization
- iOS開發實戰:從入門到上架App Store(第2版) (移動開發叢書)
- Solr Cookbook(Third Edition)
- 后臺開發:核心技術與應用實踐
- Python Machine Learning Blueprints:Intuitive data projects you can relate to
- UX Design for Mobile
- Raspberry Pi Blueprints
- DevOps 精要:業務視角
- Elasticsearch搜索引擎構建入門與實戰
- Java核心編程
- Building Microservices with Go
- 軟件測試項目實戰之功能測試篇
- 寫給所有人的編程思維
- 區塊鏈原理與技術應用