0

I often have to do web development without a reliable internet connection (e.g. on the train). I have all external javascript files locally and have set up IIS to serve them when I reference like this

<script src="http://external.dev/somescript.js" type="text/javascript"></script>

Now when I publish my website (or ideally at any point in time) I would like the external.dev to change to external.com (or a domain of my choosing). I'd like some sort of switch to flick back and forth between local and external on demand.

I assume this would be a common problem (?) so is there any techniques/tools that can help me? I could of course be approaching this the wrong way and there is an easier way to achieve my goal.

Any ideas?

4

0 回答 0