https://github.com/nowsecure/nsq-bundle
https://github.com/nowsecure/nsq-bundle
Last synced: 9 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/nowsecure/nsq-bundle
- Owner: nowsecure
- License: mit
- Created: 2015-10-14T15:01:46.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2016-02-13T00:29:23.000Z (almost 10 years ago)
- Last Synced: 2025-03-07T10:26:23.199Z (10 months ago)
- Language: JavaScript
- Size: 9.77 KB
- Stars: 8
- Watchers: 10
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# nsq-bundle
[](https://travis-ci.org/nowsecure/nsq-bundle)
Installs a nsq bundle and exposes the following binaries/scripts
* `nsqd`
* `nsqlookupd`
* `nsqadmin`
* `kill-port`
## Usage
Install it globally
```
$ npm i nsq-bundle -g
```
Run `nsqd`
```
$ nsqd -tcp-address=:5150 -http-address=:5151 -verbose=true
[nsqd] 2015/10/14 16:55:42.106852 nsqd v0.3.6 (built w/go1.5.1)
[nsqd] 2015/10/14 16:55:42.106965 ID: 498
[nsqd] 2015/10/14 16:55:42.107006 NSQ: persisting topic/channel metadata to nsqd.498.d
at
[nsqd] 2015/10/14 16:55:42.114307 TCP: listening on [::]:5150
[nsqd] 2015/10/14 16:55:42.114514 HTTP: listening on [::]:5151
```
This module is also useful as a `devDependency` if you want to run `nsqd` during tests etc.
```
$ npm i nsq-bundle -D
```
Then we can add some scripts to `package.json`, e.g.
```json
{
"name": "mymodule",
"scripts": {
"pretest": "nsqd -tcp-address=:5150 -http-address=:5151 &",
"test": "tape test.js",
"posttest": "kill-port 5150"
},
"devDependencies": {
"nsq-bundle": "^1.1.0",
"tape": "^4.2.1"
}
}
```
This is a simple setup where the `pretest` script will fire up `nsqd` before the tests and the `posttest` script will kill the `nsqd` process afterwards.
## License
MIT