当前位置:网站首页>写一个简单的nodejs脚本
写一个简单的nodejs脚本
2022-07-03 11:50:00 【乘风xs】
1.创建一个脚本文件夹
2.初始化
npm init -y3.在package.json文件中添加脚本命令
"bin": {
"recat": "./index.js"
},4.同目录下创建index.js文件,编写内容
#!/usr/bin/env node
const argvArr = process.argv;
console.log(argvArr);5. 运行命令
npm link
6.可以在命令行运行脚本啦
recat边栏推荐
- ES6新特性
- [combinatorics] permutation and combination (summary of permutation and combination content | selection problem | set permutation | set combination)
- Official website of Unicode query
- PHP get the file list and folder list under the folder
- Quantitative calculation research
- Capturing and sorting out external Fiddler -- Conversation bar and filter [2]
- 网络通讯之Socket-Tcp(一)
- (construction notes) grasp learning experience
- DEJA_ Vu3d - cesium feature set 053 underground mode effect
- 102. Sequence traversal of binary tree
猜你喜欢

Solve msvcp120d DLL and msvcr120d DLL missing

Why can't my MySQL container start

Socket TCP for network communication (I)

Self made pop-up input box, input text, and click to complete the event.

The future of cloud computing cloud native

LeetCode 0556.下一个更大元素 III - 4步讲完

雲計算未來 — 雲原生

Unity3d learning notes 5 - create sub mesh

During FTP login, the error "530 login incorrect.login failed" is reported

New features of ES6
随机推荐
1-2 project technology selection and structure
PHP导出word方法(一mht)
云计算未来 — 云原生
What is more elegant for flutter to log out and confirm again?
Slf4j log facade
Redis notes 01: Introduction
Basic knowledge of OpenGL (sort it out according to your own understanding)
Oracle advanced (I) realize DMP by expdp impdp command
2.7 overview of livedata knowledge points
Shutter: add gradient stroke to font
Laravel time zone timezone
Kubernetes three dozen probes and probe mode
023(【模板】最小生成树)(最小生成树)
MySQL time zone solution
Use bloc to build a page instance of shutter
242. Effective letter heteronyms
【附下载】密码获取工具LaZagne安装及使用
Dart: self study system
(construction notes) grasp learning experience
Lambda表达式