当前位置:网站首页>Nodejs (01) - introductory tutorial
Nodejs (01) - introductory tutorial
2022-07-03 18:12:00 【Bump】
install
Official website :http://nodejs.cn/download/
Installation tutorial :https://www.runoob.com/nodejs/nodejs-install-setup.html
Concept
Node.js It's based on Chrome V8 Engine Javascript Running environment
npm It is the largest software package warehouse in the world
n->nodejs
p-> package
m-> managers
npm It's with nodejs Installed package manager
upgrade npm To the highest version npm i -g npm
To configure
see npm Dependency package download Storage path npm root -g
Set up npm Dependency package download Storage path :npm config set prefix ' route '
see Bag Resource location :npm config get registry
Solve the problem of slow download , Therefore, it is modified as a domestic site
modify Bag Resource location :npm config set registry Resource path for example :( TaoBao npm:https://registry.npm.taobao.org)
Modify environment variables

The variable value is the dependent package storage path
The scaffold
#-g On behalf of the whole
download
grammar :npm install jquery -g( For example, download jquery)
The following appears to indicate that the download was successful 
uninstall
grammar :npm uninstall jquery -g( For example, uninstall jquery)
The following appears to indicate that the uninstall was successful 
Example
Create a file day1.js
console.log("Hello NodeJs");
Run... On the command line
First cd To day1.js Under the file path of
then
node day1.js

stay VsCode Run in
Download plug-ins CodeRunner
open day1.js Then click the upper right corner to execute 

This is it. nodejs First program of
The end ~
边栏推荐
- Distributed task distribution framework gearman
- Lesson 13 of the Blue Bridge Cup -- tree array and line segment tree [exercise]
- PHP MySQL order by keyword
- Research Report on investment trends and development planning of China's thermal insulation material industry, 2022-2028
- How to deploy applications on kubernetes cluster
- Implementation of Tetris in C language
- Image 24 bit depth to 8 bit depth
- MySQL grouping query
- Kotlin's collaboration: Context
- Redis cache avalanche, penetration, breakdown
猜你喜欢

The vscode code is automatically modified to a compliance code when it is formatted and saved

Micro service component sentinel console call

Grammaire anglaise Nom - Classification

一入“远程”终不悔,几人欢喜几人愁。| 社区征文

Redis core technology and practice - learning notes (VII) sentinel mechanism

Baiwen.com 7 days Internet of things smart home learning experience punch in the next day

Win32: dump file analysis of heap corruption

How to install PHP on Ubuntu 20.04

PHP MySQL create database

Should I be laid off at the age of 40? IBM is suspected of age discrimination, calling its old employees "dinosaurs" and planning to dismiss, but the employees can't refute it
随机推荐
[combinatorics] generating function (use generating function to solve the number of solutions of indefinite equation)
The gbase 8A database does not support the DB2 function value (column_name, 0) cluster syntax
An academic paper sharing and approval system based on PHP for computer graduation design
Basic grammar of interview (Part 2)
Mature port AI ceaspectus leads the world in the application of AI in terminals, CIMC Feitong advanced products go global, smart terminals, intelligent ports, intelligent terminals
English grammar_ Noun classification
Remote office tools sharing | community essay solicitation
聊聊支付流程的设计与实现逻辑
[Yu Yue education] family education SPOC class 2 reference materials of Shanghai Normal University
[combinatorics] generating function (commutative property | derivative property | integral property)
Keepalived 设置不抢占资源
小程序 多tab 多swiper + 每个tab分页
Change the single node of Postgres database into master-slave
[enumeration] annoying frogs always step on my rice fields: (who is the most hateful? (POJ hundred practice 2812)
Inheritance of ES6 class
Unsafe类的使用
Win32: analyse du fichier dump pour la défaillance du tas
AcWing 271. 杨老师的照相排列【多维DP】
(9) Opencv Canny edge detection
Computer graduation design PHP makeup sales Beauty shopping mall