Say I currently have two servers at www.random1.com
and www.random2.com
. If my current node.js server runs through www.random1.com
and requires to get static files (html,js,css) from www.random2.com
(ex.www.random2.com/static/javascript/script.js), what methods are there to go about doing this?
My main aims in achieving this are the following:
Example:
www.random1.com/index.html
www.random1.com
gets www.random2.com/index.html
(along with .js, .css files referred)www.random1.com
makes slight modifications to received filewww.random.com/index.html
(with required javascript, css files in original html file also loaded, hence I'd have to get those as well)I'm currently trying to get this done through Express, but general Node.js implementations are also very much welcome.
Note:
This is a question I'm asking for future reference in case there arises some situation that I have limited access to the static file server (ex.only being allowed access to the server when at work, etc.). I understand that it would realistically be easier to implement an approach where I would either just keep two copies of the same resources, or a source management system that I could branch out from and merge.
All answers are welcome.
Please show me the breadths of your intellectual powers and experience.