Answer the question
In order to leave comments, you need to log in
How is versioning done?
Project:
backend - api.site.com - pure php (without using frameworks)
front - site.com - vue.js
First I do it locally Then I make
changes in git and upload via ftp to the server and to the front
1 problem: After all, when I I fill in, there is a gap of ~ a minute when the back does not match the front
2 problem: I do it on the local => all links are initially on localhost. At what point should I change them to the production server? (for example, a link to submit a form on the front - api.localhost.com/auth When to change to api.site.com/auth (before commit or after, or in general?))
Problem 3: I often see in all sorts of articles that people make a commit to master and everything is automatically uploaded somehow, maybe this will help somehow?
Answer the question
In order to leave comments, you need to log in
3 - yes, there is webhook.js for git for that. How to create it - in Google a bunch of manuals. It seems to work via ssh, that is, you need to make yourself an ssh key for git . Again, there are many manuals on this topic.
2 - Environment variables. For example, before starting the project, write in the console: export NODE_ENV=development
In the template/code, create a variable that will be responsible for links depending on the value of NODE_ENV .
And that's all, it remains to substitute this variable in the link.
1 - webhook.js helps with this as well.
At what point should I change them to the production server?
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question