Although I have gone through the documentation available at , I am still struggling to get the mockserver up and running despite spending hours on following the instructions provided in the guide.
Could someone please outline the precise steps or identify where I may be going wrong?
Here's a snippet from my Gruntfile:
var configObj = {
connect: {
all: {
options:{
port: 9000,
hostname: "0.0.0.0"
}
}
},
start_mockserver: {
start: {
options: {
serverPort: 8080,
proxyPort: 1090
}
}
},
stop_mockserver: {
stop: {
}
}
}
In my index.html file:
<script type="text/javascript" src="https://cdn.rawgit.com/jamesdbloom/mockserver/6a2fb42cb7933d0d68e7d595785a9b0536450825/mockserver-client-javascript/src/main/javascript/mockServerClient.js"></script>
<script>
mockServerClient("localhost", 9000).mockSimpleResponse('/somePath', { name: 'value' }, 203);
</script>
I'm confused about how mockserver and grunt connect interact on different ports.
The error message appearing in the browser console when trying to access localhost:9000 is: PUT http://localhost:9000/expectation 405 (Method Not Allowed)