0.0.1 • Published 5 years ago

html-streamer v0.0.1

Weekly downloads
-
License
MIT
Repository
-
Last release
5 years ago

Html Streamers

Travis npm package

still developing

Streaming html response for each 'doc' from database

just have an html file with your document props as inner text just like handlebars

<h1>TEST</h1>
<div>
    <h2>you did it {{name}}</h2>
    <p>{{age}}</p>
    <p>{{date}}</p>
</div>

Stream your docs to html streamer

[
    {
        "name": "devin",
        "age": 1,
        "birth": 1551577903697
    },
    {
        "name": "jim",
        "age": 2,
        "birth": 1551577903698
    }
]
db.find().stream()
    .pipe(htmlStream)
    .pipe(response)

Out put will look like this

<h1>TEST</h1>
<div>
    <h2>you did it devin</h2>
    <p>1</p>
    <p>1551577903697}</p>
</div>

Installing and using

To use this with hyper simply add hyper_auto-complete to your .hyper.js

npm i html-streamer

or clone the git repo and help out