http: add

This commit is contained in:
Yoshua Wuyts
2016-05-13 12:24:51 +07:00
parent f6b4203bf7
commit 4757e791f9
10 changed files with 211 additions and 7 deletions
+12
View File
@@ -0,0 +1,12 @@
const choo = require('../../../')
module.exports = function (params, state, send) {
return choo.view`
<section>
<h1>${state['api:title']}</h1>
<h2>Latest error: ${state.error[0]}</h2>
<button onclick=${(e) => send('api:good')}>OK!</button>
<button onclick=${(e) => send('api:bad')}>Naughty</button>
</section>
`
}