RedJocker / BlackboardTestCreation

0 stars 1 forks source link

Mockoon #6

Closed RedJocker closed 9 months ago

RedJocker commented 9 months ago

I haven't been able to use mockoon yet. There seems to be a problem with the emulator.

5 @OrifjonOlimjonov

RedJocker commented 9 months ago

can you elaborate on what is happening? it is important that this should be a simple thing for users to do, if it is complicated then we have problems

OrifjonOlimjonov commented 9 months ago

I found out why. I wanted to use the Blackboard.json file by moving it to the desktop folder. But the mockoon didn't read it. It worked while it was inside the project folder. But I noticed something else. When I repeat the action in example 4, the localhost of the BlackboardCopy.json file changes to 10.0.2.16

изображение

Perhaps, this is also worth mentioning.

RedJocker commented 9 months ago

I think you are running the copy server, which seems to be on port 3002. The app is looking for port 3001. But I don't know why the message has a different address mentioned. The 10.0.2.2 is a special address on device to access 127.0.0.1 in dev machine so that we developers can make access to localhost on our computers. Mockoon has nothing to do with that address, it serves on localhost in designated port. You could use Postman for example to make requests to Mockoon and that would work just like any other server running on localhost. You could even use the browser for the get requests, you just need to access the right port. What may happen is that your device has some problem with network configuration if by some chance you changed it's network settings

RedJocker commented 9 months ago

https://stackoverflow.com/questions/9808560/why-do-we-use-10-0-2-2-to-connect-to-local-web-server-instead-of-using-computer

https://developer.android.com/studio/run/emulator-networking