Running mock server on localhost


Is there a way to make a mock server run locally on my machine? The app I’m testing expects the API to be on localhost:xxxx and I can’t change that.


Currently Postman mocks servers only run in the cloud, but you can easily control what localhost means on your machine with your local DNS, changing localhost to map to whatever address you need - here are some instructions on working with local DNS on windows & mac -

Ok, thanks. I wish they could run locally for security purposes.

@kinlane maybe an easier approach would be to use something like netcat or ssh to forward connections? Sounds like off-premise calls are a security concern in this case though.

Though this may not apply in this case, for posterity, I thought I’d mention that mock servers can run behind a protected endpoint using a Postman API key. See Editing Mock Servers in the Learning Center.