-
Notifications
You must be signed in to change notification settings - Fork 0
/
server-side.es6
57 lines (55 loc) · 1.12 KB
/
server-side.es6
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
/* eslint-disable import/extensions */
/* eslint-disable import/no-extraneous-dependencies */
/* eslint-disable import/no-unresolved */
/* eslint-disable import/prefer-default-export */
/* eslint-disable no-unused-vars */
import {
render,
doctype, html, head,
title as _title,
body,
address, article, aside,
blockquote,
canvas,
dd, div, dl, dt,
fieldset, figcaption, figure, footer, form,
h1, h2, h3, h4, h5, h6, header, hgroup, hr,
li,
main,
nav, noscript,
ol, output,
p, pre,
section,
table, tfoot,
ul,
video
} from 'render-js';
export function get(request) {
const title = 'Title';
const model = {
p: 'Text',
class: 'className',
dataProperty: 'value',
title
};
return {
body: render([
doctype(),
html([
head([
_title(title)
]), // head
body([
h1(model.title),
main(
{
class: model.class,
'data-property': model.dataProperty
},
p(model.p)
)
]) // body
]) // html
]) // render
}; // return
} // export function get