Skip to content

Instantly share code, notes, and snippets.

@DavidSouther
Created June 9, 2015 00:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save DavidSouther/dd843dc33acbc9bcb25f to your computer and use it in GitHub Desktop.
Save DavidSouther/dd843dc33acbc9bcb25f to your computer and use it in GitHub Desktop.
Rupert Basic Example
var config = {
name: "rupert-basic-example",
stassets: {
root: './src/client'
}
};
require('rupert')(config).start();
<!DOCTYPE html5>
<html lang="en">
<head>
<title>Basic Demo</title>
<link rel="stylesheet" href="/all.css"/>
</head>
<body>
<h1 class="title">Rupert Basic Demo</h1>
<div>
<p>What's your name?</p>
<input id="name" />
<p id="hello"></p>
</div>
<script src="/application.js"></script>
</body>
</html>
document.addEventListener("DOMContentLoaded", function(event) {
document.getElementById('name').addEventListener('change', function(event){
var name = event.target.value;
document.getElementById('hello').innerText = "Hello, " + name + "!";
});
});
{
"dependencies": {
"rupert": "0.3.x"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment