hcat
pipe html into your browser from command line
Last updated 2 months ago by kessler .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ npm install hcat 
SYNC missed versions from official npm registry.

hcat

Pipe html into your browser from command line

You should take a look at scat which pipes javascript into your browser or bcat for a more log piping oriented module

CLI tool

npm install -g hcat
echo '<hr>' | hcat

command line parameters

--port              set a port for this hcat execution, defaults to 0 (random port)
--hostname     set the hostname for this hcat execution, defaults to localhost
--contentType  set the content type header for this hcat execution, defaults to text/html
--contentSecurityPolicy set the content security policy header for this hcat execution, will not be added if not specified
--serveOnce    serve a single request and exit, defaults to true. open connections (keep-alive, extra requests such as /favicon.ico) are closed once the response is sent

API

npm install --save hcat
const hcat = require('hcat')
const fs = require('fs')

// config is optional
hcat(fs.createReadStream('foo.html'), { port: 8080 })

// string or buffer instead of stream
hcat('<h1>test 123</h1>', { port: 8080 })

Many thanks to all the contributors

Current Tags

  • 2.2.3                                ...           latest (2 months ago)

22 Versions

  • 2.2.3                                ...           2 months ago
  • 2.2.2                                ...           2 months ago
  • 2.2.1                                ...           a year ago
  • 2.2.0                                ...           2 years ago
  • 2.1.4                                ...           5 years ago
  • 2.1.3                                ...           6 years ago
  • 2.1.2                                ...           7 years ago
  • 2.1.1                                ...           8 years ago
  • 2.1.0                                ...           9 years ago
  • 2.0.1                                ...           9 years ago
  • 2.0.0                                ...           9 years ago
  • 1.2.0                                ...           9 years ago
  • 1.1.1                                ...           9 years ago
  • 1.1.0                                ...           10 years ago
  • 1.0.1                                ...           11 years ago
  • 1.0.0                                ...           11 years ago
  • 0.0.6                                ...           11 years ago
  • 0.0.5                                ...           13 years ago
  • 0.0.4                                ...           13 years ago
  • 0.0.3                                ...           13 years ago
  • 0.0.2                                ...           13 years ago
  • 0.0.1                                ...           13 years ago
Downloads
Total 74
Today 0
This Week 0
This Month 74
Last Day 0
Last Week 7
Last Month 0
Dependencies (3)
Dev Dependencies (0)
None
Dependents (0)
None

© 2010 - cnpmjs.org x YWFE | Home | YWFE