Files
buuh/examples/server-rendering/client.js
T

24 lines
373 B
JavaScript
Raw Normal View History

2016-05-21 21:59:03 +09:00
const choo = require('../../')
const mainView = require('./views/main')
const app = choo()
2016-05-23 23:39:22 +09:00
app.model({
namespace: 'message',
state: {
server: 'rehydration has kicked in, server data was tossed',
client: 'hello client!'
}
})
2016-05-21 21:59:03 +09:00
app.router((route) => [
route('/', mainView)
])
if (module.parent) {
module.exports = app
} else {
2016-05-23 23:39:22 +09:00
app.start('#app-root')
2016-05-21 21:59:03 +09:00
}