tree-ss

HTML DOM parser in server side

Usage no npm install needed!

<script type="module">
  import treeSs from 'https://cdn.skypack.dev/tree-ss';
</script>

README

Tree-Ss

Build an HTML DOM in server side and response it to client.

How It Works

  1. Build a tree DOM on server to render HTML.
  2. Send response procesed to client.

Usage

JS Applications

An express alternative framework

Show instructions
  1. Install by npm:

    $ npm install tree-ss
    

Config

Tree-Ss cache index template, charset and static file age

  1. trees.start():

    trees.start({
        templateIndex: __dirname + "/views/index.html", //template index
        staticage: 1000 * 60 * 60 * 24 * 7, //default = 7days
        charset: "utf-8"
    });
    
  2. trees.init(req, res):

    trees.init(req, res).render();
    

test

npm test