But only for me.
As you can see, I neglect frontend part of my app and I focus only on backend. But this is API app so I can use every possibe API client which I want to. I’m not too geeky to use curl every time. It’s fine for examples but not to every day use.
But there is nice solution. Its call postman and it’s allow me to create collection of all my endpoints, with examples, enviroments, etc. For small API like my, it’s enoght. Don’t understand me wrong. I don’t want to skip frontend part. But right now, it’s ok to use it.
I can start with something simple, like create account
And then, of course, I have to log in to my user.
It’s time to create new bike:
I created new folder with post request. But this time I have to authorize user.
I set two, local (for local tests), and production (instead of my frontend)
I don’t have too much, yet. I can set url and token.
I can replace url with value from envs.
I can easy switch between my environments.
I can authorize my request with token.
But before that I have to set it as variable
The same way I can set diferent stuff in API, like user email and password, or id of my bike.
At the end I can export and share my collection or publish as a documentation into internet. You can check my: https://documenter.getpostman.com/view/268922/2s9YRCXX4p