examples/server -> examples/server-rendering

This commit is contained in:
Yoshua Wuyts
2016-05-23 14:45:24 +09:00
parent dc840059a4
commit ab96d51a89
5 changed files with 4 additions and 3 deletions
+16
View File
@@ -0,0 +1,16 @@
const choo = require('../../')
const mainView = require('./views/main')
const app = choo()
app.router((route) => [
route('/', mainView)
])
if (module.parent) {
module.exports = app
} else {
const tree = app.start()
document.body.appendChild(tree)
}