当前位置:网站首页>写一个简单的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边栏推荐
猜你喜欢
随机推荐
LeetCode 0556.下一个更大元素 III - 4步讲完
Adult adult adult
Implement verification code verification
DEJA_ Vu3d - cesium feature set 053 underground mode effect
【嵌入式】---- 内存四区介绍
Socket TCP for network communication (I)
repo Manifest Format
Systemverilog-- OOP--对象的拷贝
(构造笔记)MIT reading部分学习心得
Fundamentals of concurrent programming (III)
Prompt unread messages and quantity before opening chat group
Dart: about grpc (I)
使用BLoC 构建 Flutter的页面实例
Basic knowledge of OpenGL (sort it out according to your own understanding)
Quantitative calculation research
Use of atomicinteger
【附下载】密码获取工具LaZagne安装及使用
OpenGL draws colored triangles
pragma-pack语法与使用
typeScript






![[official MySQL document] deadlock](/img/2d/04e97d696f20c2524701888ea9cd10.png)
