Skip to content

Instantly share code, notes, and snippets.

@blittle
Last active August 14, 2017 22:54
Show Gist options
  • Save blittle/8309fd0ee938a6b6bb9d845f41c0bffd to your computer and use it in GitHub Desktop.
Save blittle/8309fd0ee938a6b6bb9d845f41c0bffd to your computer and use it in GitHub Desktop.
overrides
<!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