In this section you will learn to prototype web sites using the Handlebars.java Server!
Just click here for download the file.
java -jar handlebars-proto-1.0.0.jar [-option value]
The Java Runtime Environment must be installed. In case you don't have one installed already, you can download and install from here.
text/html
/
6780
/
.hbs
java -jar handlebars-proto-1.0.0.jar -d site
<html>
<body>
<ul>
{{#blogs}}
<li>{{name}}</li>
{{/blogs}}
</ul>
</body>
</html>
http://localhost:6780/home.hbs
So, is that all? No, the next section teach you how to add data to your templates.
{
"blogs": [
{
"name":"Handlebars.java"
}, {
"name":"Handlebars.js"
}, {
"name":"Mustache"
}
]
}
blogs:
- name: Handlebars.java
- name: Handlebars.js
- name: Mustache
By default the data file must match the template name and must be in the same directory.
data
parameter in the url.
http://localhost:6780/home.hbs?data=path/home2
Thedata
parameter is a file path without a file extension.
Handlebars.java errors are reported through a very nice HTML page.
The Handlebars.java Server is a nice tool for prototyping web sites.
Data can be provided in two very user friendly formats and it has an excellent error reporting tool, these two features make ideal Handlebars.java for web designers.
Cool, isn't?
Thank you, for reading the Handlebars.java blog.