lstn

0.0.2 • Public • Published

lstn

lstn makes it more straightforward to listen on unix sockets by deleting old sockets when present and setting the mode of the created socket file.

Usage

lstn(server, socket[, mode][, callback]);

 
// Instead of
server.listen("/path/to/socket.sock", function(err){ /* ... */ });
 
// do it like this
var lstn = require("lstn");
 
lstn(server, "/path/to/socket.sock", 0o777, function(err){ /* ... */ })
 

When you use port and hostname arguments instead, they just get passed through.

Dependencies (0)

    Dev Dependencies (0)

      Package Sidebar

      Install

      npm i lstn

      Weekly Downloads

      2

      Version

      0.0.2

      License

      Unlicense

      Unpacked Size

      2.36 kB

      Total Files

      3

      Last publish

      Collaborators

      • yetzt