rview

1.3.3 • Public • Published

rview

Build Status Code Climate Code Coverage npm Version JS Standard

Remote view server.

Installation

$ npm install rview --save

Usage

#!/usr/bin/env node
 
/**
 * This is an example to invoke rview server
 */
'use strict'
 
const rview = require('rview')
const co = require('co')
 
co(function * () {
  // Setup server for remote view
  yield rview({
    // Define Views
    'user': {
      profile: co.wrap(function * userProfile (ctx) {
        ctx.body = `
<!DOCTYPE html><html><!-- ... --></html>
`
      })
    }
  }).listen(3000)
}).catch((err) => console.error(err))
 

License

This software is released under the MIT License.

Links

Readme

Keywords

Package Sidebar

Install

npm i rview

Weekly Downloads

13

Version

1.3.3

License

MIT

Last publish

Collaborators

  • okunishinishi