Jump to content
Main menu
Main menu
move to sidebar
hide
Navigation
Aphorismen
Applications
Business Economics & Admin.
My Computers
Cooking
Devices
Folders
Food
Hardware
Infos
Software Development
Sports
Operation Instructions
Todos
Test
Help
Glossary
Community portal
adaptions
Sidebar anpassen
Wiki RB4
Search
Search
Create account
Log in
Personal tools
Create account
Log in
Pages for logged out editors
learn more
Contributions
Talk
Editing
NodeJS
(section)
Page
Discussion
English
Read
Edit
View history
Toolbox
Tools
move to sidebar
hide
Actions
Read
Edit
View history
General
What links here
Related changes
Special pages
Page information
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
==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 (see <code>require</code> or <code>export</code>). ===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 npm -g install %Modulname // -g installs to standard directory C:\Users\U1728\AppData\Roaming\npm\node_module, see npm -g list // if -g is missing it will install it to current directory .\node_modules, see npm list npm -s // save option, adds the package to dependencies in package.json ====package.json==== <code>package.json</code> holds important information about a project. It contains human-readable metadata about the project (like the project name and description) as well as functional metadata like the package version number and a list of dependencies required by the application. It is used by the npm CLI (and yarn) to identify your project and understand how to handle the project's dependencies. It's the file that enables npm to start your project, run scripts, install dependencies, publish to the NPM registry, and many other useful tasks. The scripts sections defines the commands which could be used by npm run <SCRIPT> e.g. "scripts": { "ng": "ng", "start": "ng serve", "build": "echo 'create build timestamp' && node ./src/environments/createBuildTimestamp.js && ng build", "watch": "ng build --watch --configuration development", "test": "ng test" }, oddly enough some scripts can be called directly by <code>npm <SCRIPT></code> but not the build script. ===Examples=== * see C:\Uwes\javascripts\test ====Test1==== * test1.js var http = require('http'); // use module http 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 * [[EDTLaptop2#Node.js|EDT Elitebook 2 EW10LAP1009143]] * obsolete[[EDTLaptop1#NodeJS|EDT Elitebook]]
Summary:
Please note that all contributions to Wiki RB4 may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
Uwe Heuer Wiki New:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Toggle limited content width