“Why don’t you use Mokku?” I asked the other day, in response to a problem somebody was telling us about in the daily.
All 5 developers in that call visually went:
Oh shoot, that’s right, they’re all strong backend devs. They might not know this exists if they haven’t worked deep in the frontend trenches.
*rolls up sleeves*
Alright, LISTEN HERE then fellas, cause what I’m about to say will BLOW YOUR MINDS.
There are tools out there that allow you to mock the api requests that browsers make, which can make development easier. The one I like using is called “Mokku“.
I start sharing my screen:
“Look here. You click one button to record the requests being made, unclick to stop recording, select the request, and then change (or “mock”) the response you need. Now, when the browser makes the same request again, it will use your mocked response. Easy.”
(btw, Mokku is not an affiliate or anything. It’s just the tool I always used for this sort of stuff. You can use any other you find. I like it cause it’s just a Chrome extension.)
Everybody in the call seemed impressed that such a thing existed. They all nodded along and started downloading it.
At least... until one of them sheepishly raised their hand with a concern.
“Does it... work on production sites?”
They all turned to face me. I thought back to all the times I’ve used it to save my neck when trying to reproduce bugs that only happened in production. So I answered:
“Well... yeah! There’s no difference between environments that the tool checks, so you can use it anywhere. It’s perfect for finding production-specific issues.”
The guys nodded their heads even more. They liked the idea of a tool you can use when things break or get hairy. And just when one of them was about to give me a high-five... the same dev popped in with one last question:
“But... isn’t that dangerous?”
I paused.
Hmm.
Hmm...
HMMMM....
Is it?
“Well... it SHOULDN’T be. After all, every single api request that the user has access to CAN always be manipulated. Which is why backend validation and verification are so important. The client-side should ideally just show stuff and nothing else.”
(So, for example, you shouldn’t trust the browser to send in a “price” value in a request to the backend and use that value. Imagine if I change that value through Postman or something and pay $1 instead of $100.)
They all seemed satisfied with my answer and thanked me for the great tool.
Now I know that most devs already instinctively know you’re supposed to validate and verify everything on the backend... but a quick little reminder now and then is always great.
If you didn’t know this tool existed, check it out! And while you’re at it, remember to check out my free guide on becoming an IRREPLACEABLE frontend dev, which I made with a lot of love. Perfect for people who want to become more than “just a dev” and create leverage inside any company.
- Mauro Accorinti

Comments
Nothing yet. Say the first thing.
Sign in to join the conversation.