【发布时间】:2015-05-11 14:11:45
【问题描述】:
我在终端上使用的是 Mac OS X:
$ sudo npm install node-siege
安装围攻。我可以看到在我的文件夹中创建并安装了 node-siege 文件夹。但是当我用围攻来运行任何东西时,它给了我-bash: siege.config: command not found
不太清楚为什么。 siege.config,或任何带有 siege 的命令。它给了我找不到的命令。
编辑 我现在安装了 Siege,它在我的文件夹中,我可以运行它。
我有一个 siege.test.js
var siege = require('../../siege')
// Assuming i supposed to change the script below to the directory path then + the file to run??
// For example var siege = require(Localhost/testfolder+'/testthisfile.js')
//siege(__dirname + '/app.js')
siege()
.host('localhost')
.on(3000)
.concurrent(30)
.for(10000).times
.get('/')
.post('/')
.attack()
【问题讨论】:
-
这是因为在安装脚本的某处必须有一个命令
siege.config <something> -
我也做了 siege -c10 localhost:3000,或者任何带有 siege 的命令,它也返回 command not found 。完全不知道该怎么做。