Continuous single-page application deployment?

Here are the only solutions I came up with (I don't know how adequate they are):

Server side updates:

The version of each client request and proxy route to the corresponding server version.

Client side updates:

Inform the client about the network connection in order to re-insert script / style tags after the X number of minutes of waiting, thereby calling 2 ajax requests updated JS / CSS files and updates the HTML code p.

I don’t know if this is something that should not be a priority in the early stages of the application, and I should just accept the whole application for “scheduled maintenance” in the early hours of the morning.

For SEO purposes, the HTML on the main page is sent by the server along with one JS / CSS file.

+6
source share
2 answers

I think Right Thing (tm) should create your one-page application so that it uses the RESTful API, which is publicly available. In other words, think of it as if you were publishing your API for the world and making changes backwards compatible with them. I think that it is not as difficult as it might seem, and will leave you with a cleaner system. Of course, better than building a complex version and live plugins!

+1
source

If you are deploying a tomcat server, you can simply overwrite the .js and .css files in the correct "deployed" location ....

copy files to / your / deployed / app / location / webapp / js etc. This is a quick and easy way to “hot deploy” new JS / CSS without adding a server down ..... however, if you have backend support that also needs to be updated, which may require a tomcat service reboot. in this case, something like Jenkins might help. http://www.tomcatexpert.com/blog/2012/03/21/integrating-jenkins-and-apache-tomcat-continuous-deployment

0
source

Source: https://habr.com/ru/post/953090/


All Articles