npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

jibe

v1.1.1

Published

Jibe: be in accord; agree. A modern, lightweight, collaborative editing environment

Downloads

9

Readme

jibe

Jibe: be in accord; agree.

A modern, lightweight, collaborative editing environment.

npm version Build Status

Jibe Demo

Installation

Database setup

Jibe requires RethinkDB for data persistance.

If you do not have a RethinkDB server available, you can easily install it locally or use the Docker image:

docker pull rethinkdb
docker run -d -p 8080:8080 -p 28015:28015 -p 29015:29015 rethinkdb

Now, browse to RethinkDB's Tables tab and create a new database called 'jibe'.

Integrating with your application via npm

  • npm install --save VisionistInc/jibe

  • Require jibe within your express app.

      var app = require('express')(),
          server = require('http').createServer(app),
          io = require('socket.io').listen(server),
          jibe = require('jibe')();
    
      // initialize jibe
      app.use('/path/to/jibe', jibe.router(io));
      app.use(jibe.browserChannelMiddleware);
    
      server.listen (3000, function () {
          console.info ('Server listening at port 3000');
      });
  • Visit http://localhost:3000/path/to/jibe!

Configuration

Server

When jibe is require-ed, it is possible to pass in configuration options for connecting to RethinkDB. For example, the snippet below will tell jibe to use the given configuration.

jibe = require('jibe')({
  config: {
    "rethinkdb": {
      "host": "127.0.0.1",
      "port": 28015,
      "db": "jibe"
    }
  }
});

If no options are provided, jibe will use one of the configurations in lib/config/env based on the process.env.NODE_ENV environment variable.

Client

Currently, the client-side constructor offers a few configuration options. Defaults are provided for each option, so none are required.

$('#jibe-container').jibe ({
  defaultText: "# Welcome to {{room}}\n\n\n",
  placeholder: "This is a configurable placeholder, type your text here...",
  template: "templates/editor.html"
});
  • The defaultText option sets the initial text for a document that does not exist at the time it is requested by the client. The name of the current room will replace all instances of the pattern {{room}}.
  • Overriding the placeholder option sets the text that is displayed when the document contains no text (just like the HTML input element's placeholder attribute).
  • The template option allows developers to use a different layout, rather than the default one that is provided in this repository. There are some hardcoded ids that event handlers rely on, so it is easiest to start from the provided template and rearrange things from there.