node-nntp

A client for connecting with a NNTP server.

Usage no npm install needed!

<script type="module">
  import nodeNntp from 'https://cdn.skypack.dev/node-nntp';
</script>

README

NNTP

Client for communicating with servers through the Network News Transfer Protocol (NNTP) protocol.

NPM version Build Status Coverage Status Code Climate Gittip

Installation

$ npm install node-nntp

Usage

Here is an example that fetches 100 articles from the php.doc of the news.php.net server:

var NNTP = require('node-nntp');

var nntp = new NNTP({host: 'news.php.net', port: 119, secure: false});

nntp.connect(function (error, response) {

  nntp.group('php.doc.nl', function (error, group) {

    nntp.overviewFormat(function (error, format) {

      // If your server supports XZVER use nntp.xzver for a performance boost.
      nntp.xover(group.first + '-' + (parseInt(group.first, 10) + 100), format, function (error, messages) {
        // An array containing all messages.
        console.log(messages);
      });
    });
  });
});

License

MIT, see LICENSE