用Frisby.js进行rest apitesting

我有以下testing,写与Frisby.js :

var frisby = require('frisby'); var CONSTS = { server: 'http://localhost:8000', headers: { 'Content-Type': 'application/json', 'Accept': 'application/json' } }; frisby.create('Ensure we are dealing with a teapot') .get(CONSTS.server + '/isAlive', {headers: CONSTS.headers}, {json: true}) .timeout(10000) .expectStatus(200) .toss(); 

我得到这个结果:

 Failures: 1) Frisby Test: Ensure we are dealing with a teapot [ GET http://localhost:8000/isAlive ] Message: Expected 500 to equal 200. 

当我通过邮递员或通过浏览器执行这个时,我得到正确的结果,这是:

 { "alive": true } 

另外,在testing远程端点时,它似乎正在工作。
我做错了什么?

我的服务器使用以下命令在laravel简单的Web服务器上运行:

 php artisan serve 

通过运行这个,web服务器不能从localhostnetworking外部访问。
我已经改变它可以从外面访问使用以下命令:

 php artisan serve --host 0.0.0.0 

希望它可以帮助别人