mirror of
https://github.com/sstent/node.git
synced 2026-01-26 23:22:28 +00:00
24 lines
506 B
JavaScript
24 lines
506 B
JavaScript
var derby = require('derby')
|
|
, app = derby.createApp(module)
|
|
, get = app.get
|
|
|
|
// TODO: Figure out how to make browserify allow components to be in root directory
|
|
derby.use(require('./ui'))
|
|
|
|
get('/', function(page, model) {
|
|
model.subscribe('test', function(err, test) {
|
|
test.setNull('options', [
|
|
{text: 'First'}
|
|
, {text: 'Second'}
|
|
, {text: 'Third'}
|
|
])
|
|
page.render()
|
|
})
|
|
})
|
|
|
|
app.ready(function(model) {
|
|
app.showModal = function() {
|
|
model.set('_showModal', true)
|
|
}
|
|
})
|