# linejs

> A configurable, scalable & elegant Node.js standalone WAMP router based on the WAMP websocket subprotocl

Latest version **0.1.1** (published 2014-11-09) · 0 weekly downloads

## Install

```sh
npm install linejs
pnpm add linejs
yarn add linejs
bun add linejs
```

Provides the command `line`.

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.1 |
| Published | 2014-11-09 |
| First published | 2014-11-08 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >= 0.10.0 |
| Dependencies | 4 |
| Known vulnerabilities | 0 (+5 in 1 direct dependencies) |
| Install scripts | no |
| Author | Glen Selle |
| Maintainers | glenselle |
| Keywords | WAMP, router, line, websocket |

## Links

- npm: https://www.npmjs.com/package/linejs
- Repository: https://github.com/zipline/line
- Homepage: http://zipline.github.co/line
- Issues: https://github.com/zipline/line/issues
- npm.io page: https://npm.io/package/linejs

## Dependencies (4)

- [chalk](https://npm.io/package/chalk.md) ^0.5.1
- [lodash](https://npm.io/package/lodash.md) ^2.4.1
- [autobahn](https://npm.io/package/autobahn.md) ^0.9.5
- [commander](https://npm.io/package/commander.md) ^2.5.0

## Alternatives

- [@opentelemetry/exporter-zipkin](https://npm.io/package/@opentelemetry/exporter-zipkin.md) — 14.8M weekly downloads
- [pusher-js](https://npm.io/package/pusher-js.md) — 2.0M weekly downloads
- [browserify](https://npm.io/package/browserify.md) — 1.7M weekly downloads
- [sqs-consumer](https://npm.io/package/sqs-consumer.md) — 1.7M weekly downloads
- [@sanity/eventsource](https://npm.io/package/@sanity/eventsource.md) — 930.8K weekly downloads

## Recent versions

- 0.1.1 (latest) — 2014-11-09
- 0.1.0 — 2014-11-08

## README

[![Line Logo](https://566bd77c05dc07a0e763-6933a8d7ca9fc811729fefad70c21073.ssl.cf2.rackcdn.com/linelogo.png)](http://zipline.github.io/line)

<p align="center"> A powerful, scalable &amp; elegant Node.js realtime application framework based on the WAMP websocket subprotocl </p>



    $ npm install -g linejs && line

About
=====
[![npm version](https://badge.fury.io/js/linejs.png)](http://badge.fury.io/js/linejs)

Line is all about...

Getting Started
===============

At the moment (v0.1.0) Line is a thin command-line wrapper around the nightlife-rabbit WAMP router developed by . It enforces the standalone requirement of the WAMP specification by encapsulating the logic into a lightweight command line tool to run a standalone NodeJS WAMP router. As such, to run the router, simply run the `line` command:

    $ line

And it will fire up a simple WAMP router. There are presently three configurable options as follows (you can access this by running `line -h`):

    Options:

        -h, --help          output usage information
        -v, --version       output the version number
        -p, --port [value]  The port the router will listen on (defaults to 3131)
        -P, --path [value]  The path of the websocket connection (defaults to /line)
        -o, --autoOff       Disable auto realm creation if the realm does not exist (defaults to false)

FAQ
===

**Is LineJS a Node.js WAMP router?**

No, LineJS does not try to be a WAMP router and neither should it be used as such. LineJS is a framework or template to be used and configured to build next generation realtime web APIs to replace RESTful HTTP APIs.

**Why isn't LineJS a WAMP router?**

Because that's not what it is. There already exist several open source WAMP routers including the officially supported Crossbar.io project which can run NodeJS application logic.

**If LineJS isn't a WAMP router how can it use WAMP?**

This question is usually asked because of a fundemental misunderstanding of WAMP. WAMP is a protocol, just like HTTP. And it can be used in many different ways. For example, REST (REpresentational State Transport) is a way to use HTTP. But one could just as easily use the HTTP protocol in ways that would violate RESTful principles. In much the same way, WAMP functions as a subprotocl based on websockets. Unfortunately, the WAMP spec includes one opiniated requirement that systems using WAMP should always use routers. We believe this is a fundemtal flaw in the WAMP spec since a communication spec should not worry about architecture. As a result, we've taken an approach very similar to existing HTTP APIs which combines the power and flexiblity of WAMP with the proven architecture of HTTP APIs and combined them to get LineJS. We like to think of it as a cross between generic HTTP APIs and WAMP. Or you could call it a hybrid WAMP solution.

**So does that mean LineJS violates the WAMP protocl spec?**

Yes, LineJS does violate the one requirement that those implementing the WAMP spec use routers. As a result, LineJS is **NOT** WAMP compliant. In all other aspects, however, LineJS does correctly implement the WAMP spec.

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