compound
Version:
CompoundJS - MVC framework for NodeJS
96 lines (90 loc) • 4.17 kB
HTML
<html>
<head>
<title>Welcome to Compound</title>
<link rel="stylesheet" href="http://twitter.github.com/bootstrap/1.3.0/bootstrap.min.css">
<meta name="viewport" content="width=500, initial-scale=0.5">
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
<script type="text/javascript" src="/javascripts/rails.js"></script>
</head>
<body>
<div class="container">
<div class="page-header" style="text-align: center;">
<h1 style="text-align:left; padding-top: 35px; padding-left: 100px">Welcome to</h1>
<img src="/images/compound.png" alt="CompoundJS" />
</div>
<h6 style="text-align: center;">
<a href="/compound/environment.json" id="show-env-info-link" data-remote="true" data-jsonp="load">Information about application environment</a>
</h6>
<div id="env-info"></div>
<hr />
<div class="row">
<div class="span8 offset4">
<div class="content">
<h6>1. Start with <a href="http://compoundjs.com/docs.html#generators">generators</a></h6>
<p> This is the fastest way to create an application:</p>
<pre>compound generate crud post title content date:date published:boolean</pre>
<h6>2. Then describe a <a href="http://compoundjs.com/docs.html#routing">route</a></h6>
<p>in <code>config/routes.js</code> and remove this file (<code>public/index.html</code>)</p>
<pre>exports.routes = function (map) {
map.get('/', 'posts#index');
};</pre>
<h6>3. Design your <a href="http://compoundjs.com/docs.html#orm">database</a></h6>
<p>in <code>db/schema.js</code> and describe models in <code>app/models/*</code></p>
<h6>4. Keep your <a href="http://compoundjs.com/docs.html#controllers">controllers</a> thin!</h6>
<p>Write tests, and good luck.<br> If you have any questions feel free to ask at <a href="http://groups.google.com/group/compoundjs">CompoundJS Google Group</a> or <a href="irc://irc.freenode.net/compoundjs">#compoundjs on irc.freenode.net</a>.</p>
<p>Track CompoundJS project state on our <a href="https://trello.com/board/railwayjs/4f0a0d49128365065e008a1d">Trello board</a>, vote for features, discuss. Help us to get better!</p>
</div>
</div>
<div class="span4">
<p>
<h6>5. Links in sidebar</h6>
<ul style="padding-left: 0px;">
<li><a href="http://compoundjs.com">CompoundJS project docs</a></li>
<li><a href="http://expressjs.com">ExpressJS project homepage</a></li>
<li><a href="http://jsdoc.info/1602/jugglingdb">JugglingDB ORM API docs</a></li>
<li><a href="http://compoundjs.com/juggling.html">Try JugglingDB in your browser, docs</a></li>
</ul>
</p>
</div>
</div>
<footer>
</footer>
<script>
function load(data) {
$('#show-env-info-link').hide();
if (data.forbidden) {
return '';
}
var html = '<table class="zebra-striped">';
html += makeList('Versions', data.versions);
html += makeList('Settings', data.settings);
html += makeList('Application', data.application);
html += makeList('ENV', data.env);
html += '</table>';
$('#env-info').html(html);
}
function makeList(title, obj) {
var res = '<tr><td colspan="2"><h6>' + title + '</h6></td></tr>';
for (var i in obj) {
res += '<tr><td>' + i + '</td><td>' + toS(obj[i]) + '</td></tr>';
}
return res;
}
function toS(obj) {
if (obj instanceof Array) {
return obj.join('<br />');
} else if (typeof obj === 'object') {
var s = [];
for (var i in obj) {
s.push(i + ': ' + obj[i]);
}
return s.join(', ');
} else {
return obj;
}
}
</script>
</div>
</body>
</html>