A Node.js module for running Nailgun servers.
This package enable you to run Nailgun servers through your Node.js applications.
Note that this only provides support for running Nailgun servers. If you are need of a Nailgun client for Node.js, node-nailgun-client is recommended.
npm install node-nailgun-server
By the default the server will listen to all interfaces on port 2113.
const nailgun = ;const server = nailgun;serverout;
In the following example node-nailgun-client is used to communicate with the server:
const nailgun = ;const client = ;const options =address: 'localhost'port: 0 // 0 lets the server choose a random portnailgun;
The server object returned when creating a server provides a output stream and also a function for shutting the server down:
Servers are also shutdown automatically when the Node.js process exits.
Apache License 2.0