npm.io
0.0.8 • Published 5 years ago

tree-ss

Licence
MIT
Version
0.0.8
Deps
0
Size
30 kB
Vulns
0
Weekly
0

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

Keywords