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 🙏

© 2026 – Pkg Stats / Ryan Hefner

feathers-horizon

v0.6.4

Published

Horizon.js feathers plugin

Readme

feathers-horizon

Build Status GitHub issues Download Status Greenkeeper badge

Horizon.js feathers plugin, this plugin will start an horizon server instance using provided options or defaults feathers config.

Goals

Plugins intent to add missing horizon.js functionality by leveraging the excellent featherjs for backend. It uses feathers authentication for local strategy

This grants you the entire featherjs ecosystem around your horizon.js application

Thank you

Made possible and inspired by the generous tailsu and his Demo: third-party authentication for horizon

Roadmap

  • [x] 0.x - proof of concept - launch horizon in feather using application configuration .
  • [ ] 1.0 - Better test coverage, error handling and full options.
  • [ ] 2.0 - Add horizon client for server side reactive queries.
  • [ ] 3.0 - Add user copy on auth hooks in case of non rethinkdb feather app.

Installation

npm install feathers-horizon --save

Options (optionnal, will refer to feathers-configuration if provided)

Options that can be passed to the Horizon server constructor are identical to the similarly-named options that can be defined in the configuration file, with the same defaults:

  • project_name: 'horizon'
  • rdb_host: 'localhost'
  • rdb_port: 28015
  • auto_create_collection: false
  • auto_create_index: false
  • permissions: true
  • path: '/horizon'
  • auth:
    • duration: '1d'
    • new_user_group: 'authenticated'
    • token_secret: null
    • allow_anonymous: false
    • allow_unauthenticated: false

Create your app using feathers generators

feathers generate app
feathers generate authentication
npm install feathers-horizon --save

Then import and configure the plugin after Authentication plugin

...
const feathersHorizon = require('feathers-horizon');
...
app.configure(authentication);
app.configure(feathersHorizon());
...

Complete Example

Here's an example of a Feathers server that uses feathers-horizon.

const path = require('path');
const favicon = require('serve-favicon');
const compress = require('compression');
const cors = require('cors');
const helmet = require('helmet');
const bodyParser = require('body-parser');

const feathers = require('feathers');
const configuration = require('feathers-configuration');
const hooks = require('feathers-hooks');
const rest = require('feathers-rest');
const socketio = require('feathers-socketio');
const feathersHorizon = require('feathers-horizon');
const middleware = require('./middleware');
const services = require('./services');
const appHooks = require('./app.hooks');

const authentication = require('./authentication');
const rethinkdb = require('./rethinkdb');
const app = feathers();

// Load app configuration
app.configure(configuration(path.join(__dirname, '..')));
// Enable CORS, security, compression, favicon and body parsing
app.use(cors());
app.use(helmet());
app.use(compress());
app.use(bodyParser.json());
app.use(bodyParser.urlencoded({extended: true}));
app.use(favicon(path.join(app.get('public'), 'favicon.ico')));
// Host the public folder
app.use('/', feathers.static(app.get('public')));

// Set up Plugins and providers
app.configure(hooks());
app.configure(rethinkdb);
app.configure(rest());
app.configure(socketio());
app.configure(services);
app.configure(authentication);
app.configure(feathersHorizon());

// Set up our services (see `services/index.js`) Configure middleware (see
// `middleware/index.js`) - always has to be last
app.configure(middleware);
app.hooks(appHooks);

//Create a default users for our tests. 
var User = {
 email: '[email protected]',
 password: 'admin',
 permissions: ['*']
};

app.service('users')
 .create(User)
 .then(user => {
   console.log('Created default user', user);
 })
  .catch(console.error);
module.exports = app;

License

Copyright (c) 2017

Licensed under the MIT license.