stubby4node
stubby4node copied to clipboard
stubby seems to fail without error messages
I just tried using stubby both in Windows 10 Pro and Ubuntu. When I start it up, there is no message, it just returns me to the command line without any error either. When attempting to connect to either 8889 or 8882 on localhost, I get connection refused.
I launch stubby with the following command:
stubby -d api-stubs.yml -l localhost -w
This is my api-stubs.yml file:
# valid login
- request:
url: ^/login/?$
method: GET
query:
email: [email protected]
password: dadada
response:
- status: 200
headers: application/json
body: >
{
"id":"fedcba-123456-abcdef",
"email":"[email protected]"
}
# invalid login
- request:
url: ^/login/?$
method: GET
query:
email: [email protected]
password: "(!dadada)"
response:
- status: 401
# logout
- request:
url: ^/logout/?$
method: GET
response:
- status: 200