Skip to content

Instantly share code, notes, and snippets.

@mosfet1kg
Created February 15, 2017 05:40
Show Gist options
  • Save mosfet1kg/7e1bf37882b33c0e60dbf0599f614155 to your computer and use it in GitHub Desktop.
Save mosfet1kg/7e1bf37882b33c0e60dbf0599f614155 to your computer and use it in GitHub Desktop.
javascript file inclue after server init
<!DOCTYPE html>
<html>
<head>
<title><%= title %></title>
<link rel='stylesheet' href='/stylesheets/style.css' />
</head>
<body>
<h1><%= title %></h1>
<p>Welcome to <%= title %></p>
</body>
<script>
(function(d, s) {
var js = d.createElement(s),
sc = d.getElementsByTagName(s)[0];
js.src="js/test.js";
sc.parentNode.insertBefore(js, sc);
}(document, "script"));
</script>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment