Last active
August 14, 2017 22:54
-
-
Save blittle/8309fd0ee938a6b6bb9d845f41c0bffd to your computer and use it in GitHub Desktop.
overrides
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<body> | |
<script> | |
import(`${getDomain()}/app.js`); | |
function getDomain() { | |
const override = localStorage.getItem('override'); | |
if (override === 'beta') return 'https://beta.myapp.com'; | |
else if (override === 'localhost') return 'https://localhost:8080'; | |
else return 'https://prod.myapp.com'; | |
} | |
</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment