C
C
cshabb2018-09-07 21:28:24
API
cshabb, 2018-09-07 21:28:24

How to organize the Web API development process?

Hello.
It is planned to create an API and an application that will work with this API, together with another developer.
My task is to make an API, his is to work with this API. In this case, the entire development process is carried out simultaneously, i.e. I make an API, I test it, then I want to send the updated version to a remote server so that another developer can use the updated version. I planned as follows:
- I make some kind of update (commit), I push to the remote repository
- I download the update on the remote server, restart the server or script
- Another developer can now continue to work with the updated version of the API.
I would like to ask how to organize this whole process correctly, because there are probably some tools that allow you to synchronize files on the fly during the development process from my computer to a remote one.
And another question: how to test the API correctly?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Alexey, 2018-09-07
@Softovick

GIT has hooks that can also run when a commit is received.
Ideally, your service development process should have three stages - dev, stage, production.
That is, dev is you working, for example, with your copy of the code on your computer. It is also when that developer works with a copy of the code at home. That is, each of the participants in some way raises a local copy of the application (as a whole or in separate parts, I don’t know what kind of application you have there). No special explanation is needed, I hope? Data exchange through any repository occurs, here you are thinking correctly. You fixed it, sent a commit - the developer was informed, he downloaded it for himself and did something on his own, the result was sent to the repository, etc. round.
For the stage stage, it usually means an environment (server) that is as close as possible to where the application will run. But still, this is a test version, on which you, together with the developer, debug the final version before uploading it to the production server. And after everything works, send the code to the worker.
There are many ways to "synchronize on the fly". Read about GIT HOOK, maybe this is what you need. There you can write a script that, for example, upon a commit with a specific tag, raises the test implementation of the application and sends access data to developers.
You can also use special hosting, such as Heroku, where the process is quite automated and convenient.
On the issue of testing - refer to the recommendations and literature on the programming language and technology you use (well, there, which engine you use). Usually there are fairly detailed recommendations on how to test, what is needed for this, what software to use, etc.

F
forspamonly2, 2018-09-08
@forspamonly2

this is called continuous integration.
set up some thread of the CI server, on it the build task by commit and the deployment task to the development server by command.
sometimes it is convenient to do different tasks for backend and frontend deployment.
Deploying each commit is impractical - this leads to a violation of the granularity of commits.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question