Dockerize the microfrontends application
kanhery opened this issue ยท 4 comments
Hi Team,
I want to put all fragments and backend into a docker container.
Challenge is how to replace fragment src/urls in index.html dynamically ?
taking example of https://github.com/tsnolan23/tailor-react-spa
How do I replace localhost of fragments with IP address of machine on which my docker is running ?
please throw some light on this.
Hello.
see this one. maybe it will help you:
https://github.com/morriq/Frontend-microservices/blob/master/docker-compose.yml#L26
How do I replace localhost of fragments with IP address of machine on which my docker is running ?
That is a very specific question that really requires to see your implementation to really help ๐
But Tailor is really flexible and you can essentially rewrite every on the fly, so both templates, req and res can be changed while it is running to fit dynamically ๐
@kevinsimper Yes, That worked, I modified the html having all fragments just before it gets sent over http response. Thanks !