When you want change website, you need change all scripts. Why you don't inject main part of URL into all scripts as parameter?
My potential structure of this:
└── api └── todos ├── delete.sh ├── get.sh ├── get-by-user.sh ├── get-all.sh ├── patch.sh ├── post.sh └── put.sh
But still is too much repeated parts of this. Maybe one script with one switch?
You can structure the files as you want.
to change the baseurl you can run
sed -in 's/https:\/\/jsonplaceholder.typicode.com/https:\/\/new_base_url.com/' api/todos/**/*.sh
or you can use vim-rest-console as some comments mentioned.
The point is to make things easy and avoid havind to remember a bunch of things just to do somethin, this ifs the opposite of automation
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
When you want change website, you need change all scripts. Why you don't inject main part of URL into all scripts as parameter?
My potential structure of this:
But still is too much repeated parts of this. Maybe one script with one switch?
You can structure the files as you want.
to change the baseurl you can run
or you can use vim-rest-console as some comments mentioned.
The point is to make things easy and avoid havind to remember a bunch of things just to do somethin, this ifs the opposite of automation