nodejs 批处理执行 app.js
来源:互联网 发布:macbook air mac系统 编辑:程序博客网 时间:2024/05/17 05:00
1、直接运行run.bat文件
下面的内容为批处理文件run.bat中的内容,批处理命令中NODE_PATH为Node.js的安装路径。使用express 生成的项目。app.js为待测试的Node.js 文件。
@set NODE_PATH=D:\nodejs\demo\npm
@echo %PATH% | find "Node.js"
@if %errorlevel% == 1 set PATH=%PATH%;%NODE_PATH%
@rem @echo %cd%
@node app.js
2、通过参数运行run.bat文件
批处理文件仅起到设置环境变量的作用,在Node.js项目的目录下运行。批处理文件命令为:
@set NODE_PATH=D:\nodejs\demo\npm
@echo %PATH% | find "Node.js"
@if %errorlevel% == 1 set PATH=%PATH%;%NODE_PATH%
@rem @echo %cd%
@node %1
例如:
D:\nodejs\demo\>node app.js
0 0
- nodejs 批处理执行 app.js
- nodejs app.js详解
- nodejs express框架 中app.js
- nodejs express框架 app.js文件该html模板
- 安装NodeJS及web服务器(运行js,不需要在浏览器执行js)
- 批处理加载执行注册表
- 批处理执行.SQL文件
- 批处理执行SQL备份
- 批处理执行SQL备份
- jdbc批处理执行事务管理
- C#执行批处理命令
- bat批处理后台执行
- installshield中执行批处理
- Jdbc的批处理执行
- 批处理bat执行exe
- jdbc执行批处理①
- jdbc执行批处理②
- bat批处理执行python
- 【c/c++ 算法/数据结构】 邻接矩阵表示图,深度,广度优先遍历 算法设计+代码+图片
- @autoreleasepool学习记录
- WTL界面自绘系列-预备
- 损失函数(loss function)
- Sapphire手机按钮检测控件Sapphire Buttons Utility详细介绍
- nodejs 批处理执行 app.js
- Activex、OLE、COM、OCX、DLL之间的区别(转)
- 重启电脑之后文件丢失怎么办
- JAVA-线程安全性
- 云计算
- nginx “403 Forbidden” 错误的原因及解决办法
- 聚合函数,分组查询,连接查询综合例子
- 搭建高性能Jboss负载均衡集群
- C++ 定义引用型类成员变量