# node-nailgun-client

> A Node.js Nailgun client API and CLI

Latest version **0.1.2** (published 2019-01-26) · Apache v2 license · 0 weekly downloads

## Install

```sh
npm install node-nailgun-client
pnpm add node-nailgun-client
yarn add node-nailgun-client
bun add node-nailgun-client
```

Provides the command `node-nailgun-client`.

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.2 |
| Published | 2019-01-26 |
| First published | 2015-07-19 |
| Weekly downloads | 0 |
| License | Apache v2 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 17.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Markus Hedvall |
| Maintainers | markushedvall |

## Links

- npm: https://www.npmjs.com/package/node-nailgun-client
- Repository: https://github.com/markushedvall/node-nailgun-client
- Homepage: https://github.com/markushedvall/node-nailgun-client#readme
- Issues: https://github.com/markushedvall/node-nailgun-client/issues
- npm.io page: https://npm.io/package/node-nailgun-client

## Dependencies (1)

- [commander](https://npm.io/package/commander.md) ^2.8.1

## Recent versions

- 0.1.2 (latest) — 2019-01-26
- 0.1.0 — 2015-07-19

## README

# node-nailgun-client

A Node.js [Nailgun](http://martiansoftware.com/nailgun/) client API and CLI.

The Nailgun client API lets you run java code in Nailgun directly from your javascript in a Node.js environment.

A CLI is also provided in order to interact with Nailgun servers directly.

# Install

```
npm install node-nailgun-client
```

# Example

Executing a command on a Nailgun server is very simple:
```javascript
var nailgunClient = require('node-nailgun-client');

var nail = nailgunClient.exec('ng-stats');

nail.stdout.pipe(process.stdout);
```

The Nailgun server address and port can be specfied using options:
```javascript
var nailgunClient = require('node-nailgun-client');

var options {
  address: 'localhost',
  port: 2113,
}

var args = ['your', 'args'];

var nail = nailgunClient.exec('yourpackage.YourClass', args, options);

nail.stdout.pipe(process.stdout);
nail.stderr.pipe(process.stderr);

process.stdin.pipe(nail.stdin);

nail.on('exit', function(code) {
  process.exit(code);
});
```

# CLI

```
Usage: node-nailgun-client [options] command [args]

Options:

  -h, --help              output usage information
  -V, --version           output the version number
  -s, --server [address]  the address of the nailgun server
  -p, --port [port]       the port of the nailgun server
```

# License
Apache v2

---
_Source: https://npm.io/package/node-nailgun-client · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
