All Projects → kessler → node-hcat

kessler / node-hcat

Licence: MIT license
pipe html into your browser from command line

Programming Languages

javascript
184084 projects - #8 most used programming language
HTML
75241 projects

Labels

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

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

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].