Code Monkey home page Code Monkey logo

nsq-bundle's Introduction

nsq-bundle

travis

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.

{
  "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

nsq-bundle's People

Contributors

ralphtheninja avatar

Stargazers

C.J. Winslow avatar Benjamin E. Coe avatar Makara Wang avatar Zaher Ghaibeh avatar Yosh avatar  avatar Isagani Mendoza avatar Julian Gruber avatar

Watchers

Julian Gruber avatar Erik Kristensen avatar heapwolf avatar  avatar James Cloos avatar Andrew Hoog avatar Jon Porter avatar  avatar Chris Wiley avatar Nora The Narwhal avatar  avatar

Forkers

pkdevboxy

nsq-bundle's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.