Node.js is a MIT-licensed open source JavaScript runtime environment. Built on Chrome's JavaScript Runtime (v8), it is an event-driven, non-blocking, and lightweight framework, initially mostly used to produce dynamic web content but currently used in a wide variety of applications, from scripting to HTML5 user interfaces. This recipe will show how to add Node.js applications to a target image.
Node.js has its own package manager, Node Packaged Modules (npm), which allows you to install third party modules and their dependencies. Modules are either installed locally, inside a directory, or globally, that is, on a location typically available as part of your path so they can be globally accessed.
Most Node.js applications make extensive use of modules. A module is basically application code described by a package.json
file. The code and packages.json
files can be in a directory, a Git repository, a compressed tarball, or a URI to a compressed tarball...