If you use docker there are quite a few mocker-in-a-box solutions.
I use Java and Node, and created something basic [1] that does this for testing.
[1] https://github.com/acrontum/moxy