NodeJS: Difference between revisions
(→Test1) |
|||
| Line 3: | Line 3: | ||
node -v // prints version | node -v // prints version | ||
Node.js has a set of built-in '''modules''' which you can use without any further installation, Consider modules to be the same as JavaScript libraries. | |||
===npm=== | ===npm=== | ||
'''npm''' (ehemals Node Package Manager) ist ein Paketmanager für die JavaScript-Laufzeitumgebung Node.js. Unter dem Namen npm Registry bzw. npm Open Source wird ein Repository betrieben, über das 350.000 Pakete (Stand 13. Januar 2017[4]) unter einer freien Lizenz bereitgestellt werden. npm is the world's largest software registry. Open source developers from every continent use npm to share and borrow packages, and many organizations use npm to manage private development as well. | '''npm''' (ehemals Node Package Manager) ist ein Paketmanager für die JavaScript-Laufzeitumgebung Node.js. Unter dem Namen npm Registry bzw. npm Open Source wird ein Repository betrieben, über das 350.000 Pakete (Stand 13. Januar 2017[4]) unter einer freien Lizenz bereitgestellt werden. npm is the world's largest software registry. Open source developers from every continent use npm to share and borrow packages, and many organizations use npm to manage private development as well. | ||
Revision as of 13:36, 22 January 2021
Concept
Node.js ist eine plattformübergreifende Open-Source-JavaScript-Laufzeitumgebung, die JavaScript-Code außerhalb eines Webbrowsers ausführen kann.
node -v // prints version
Node.js has a set of built-in modules which you can use without any further installation, Consider modules to be the same as JavaScript libraries.
npm
npm (ehemals Node Package Manager) ist ein Paketmanager für die JavaScript-Laufzeitumgebung Node.js. Unter dem Namen npm Registry bzw. npm Open Source wird ein Repository betrieben, über das 350.000 Pakete (Stand 13. Januar 2017[4]) unter einer freien Lizenz bereitgestellt werden. npm is the world's largest software registry. Open source developers from every continent use npm to share and borrow packages, and many organizations use npm to manage private development as well.
npm consists of three distinct components:
- the website
- the Command Line Interface (CLI)
- the registry
Use the website to discover packages, set up profiles, and manage other aspects of your npm experience. For example, you can set up organizations to manage access to public or private packages. The CLI runs from a terminal, and is how most developers interact with npm. The registry is a large public database of JavaScript software and the meta-information surrounding it.
npm -v // prints version
C:\Users\U1728\AppData\Roaming\npm C:\Users\U1728\AppData\Roaming\npm-cache
npm install %Modulname
Examples
- see C:\Uwes\javascripts\test
Test1
- test1.js
http.createServer(...).listen(8282)
node test1.js // creates a http server which listens to port 8282
http://localhost:8282 // netstat -a
Installation
The NPM program is installed on your computer when you install Node.js