当前位置:网站首页>写一个简单的nodejs脚本
写一个简单的nodejs脚本
2022-07-03 11:50:00 【乘风xs】
1.创建一个脚本文件夹
2.初始化
npm init -y
3.在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
边栏推荐
猜你喜欢
AOSP ~ NTP (Network Time Protocol)
Visual studio 2022 downloading and configuring opencv4.5.5
Use bloc to build a page instance of shutter
Swagger
Shardingsphere sub database and sub table < 3 >
为什么我的mysql容器启动不了呢
(construction notes) ADT and OOP
Kubernetes three dozen probes and probe mode
Colleagues wrote a responsibility chain model, with countless bugs
If you can't learn, you have to learn. Jetpack compose writes an im app (II)
随机推荐
Laravel time zone timezone
shardingSphere分库分表<3>
LeetCode 0556.下一个更大元素 III - 4步讲完
Flutter: self study system
temp
temp
网络通讯之Socket-Tcp(一)
Fundamentals of concurrent programming (III)
225. Implement stack with queue
145. Post order traversal of binary tree
Dart: about Libraries
DEJA_ Vu3d - cesium feature set 053 underground mode effect
repo Manifest Format
Wechat applet - basic content
【mysql专项】读锁和写锁
Oracle advanced (I) realize DMP by expdp impdp command
云计算未来 — 云原生
[embedded] - Introduction to four memory areas
SystemVerilog -- OOP -- copy of object
Self made pop-up input box, input text, and click to complete the event.