<commit_before># node-named - DNS Server in Node.js

Node-named is a lightweight DNS server written in pure javascript. It has
limited support for the DNS spec, but aims to implement all of the *common*
functionality that is in use today. 



## Creating a DNS Server

    var named = require('./lib/index');
    var server = named.createServer();
    var ttl = 300;

    server.listen(9999, '127.0.0.1', function() {
      console.log('DNS server started on port 9999');
    });

    server.on('query', function(query) {
      var domain = query.name();
      console.log('DNS Query: %s', domain)
      var target = new SOARecord(domain, {serial: 12345});
      query.addAnswer(domain, target, ttl);
      server.send(query);
    });

## Creating DNS Records

node-named provides helper functions for creating DNS records. 
The records are available under 'named.record.NAME' where NAME is one
of ['A', 'AAAA', 'CNAME', 'SOA', 'MX', 'TXT, 'SRV']. It is important to 
remember that these DNS records are not permanently added to the server. 
They only exist fo the length of the particular request. After that, they are
destroyed. This means you have to create your own lookup mechanism.

    var named = require('node-named');
    
    var soaRecord = named.SOARecord('example.com', {serial: 201205150000});
    console.log(soaRecord);

### Supported Record Types
<commit_msg>fixed README<commit_after># node-named - DNS Server in Node.js

Node-named is a lightweight DNS server written in pure javascript. It has
limited support for the DNS spec, but aims to implement all of the *common*
functionality that is in use today. 



## Creating a DNS Server
```javascript
    var named = require('./lib/index');
    var server = named.createServer();
    var ttl = 300;

    server.listen(9999, '127.0.0.1', function() {
      console.log('DNS server started on port 9999');
    });

    server.on('query', function(query) {
      var domain = query.name();
      console.log('DNS Query: %s', domain)
      var target = new SOARecord(domain, {serial: 12345});
      query.addAnswer(domain, target, ttl);
      server.send(query);
    });
```
## Creating DNS Records

node-named provides helper functions for creating DNS records. 
The records are available under 'named.record.NAME' where NAME is one
of ['A', 'AAAA', 'CNAME', 'SOA', 'MX', 'TXT, 'SRV']. It is important to 
remember that these DNS records are not permanently added to the server. 
They only exist fo the length of the particular request. After that, they are
destroyed. This means you have to create your own lookup mechanism.
```javascript
    var named = require('node-named');
    
    var soaRecord = named.SOARecord('example.com', {serial: 201205150000});
    console.log(soaRecord);
```
### Supported Record Types

{'fraction_non_alphanumeric': 0.11561938958707361, 'fraction_numerical': 0.024416517055655295, 'mean_word_length': 3.552287581699346, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 2, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '550054', 'n_tokens_mistral': 887, 'n_tokens_neox': 794, 'n_words': 325}