Skip to content

Add the possibility to import the tool as module  #1

@moty66

Description

@moty66

why not?

const ApacheStatus = require('apache-status');

let a  = new ApacheStatus([
    {url: 'http://example.com', client:'6.*'},
    {reverseDnsLookup: true, client:'host.*'}
]);

a.parse((res) => {
   if (res.length) {
       console.log(a.connections[0].CLIENT, a.connections[0].METHOD );
    }
}, (err) => console.error);

This add the possibility to build other node packages using this repository.

What do we need to do

Really little,

  • the output option need to be optional in a first place, and ./src/apache-status.ts has to add it manually.
  • Creating an index.js file in the root where we have to export the ApacheStatus class.
  • Small rewrite of the class ApacheStatus to externalize the command line args parsing

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions