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

grpc-acl

v0.0.5

Published

GRPC ACL microservice

Downloads

7

Readme

grpc-acl

GRPC ACL microservice in node. Built on top of condor-framework and acl.

Build Status Coverage Status

Installation

npm i --save grpc-acl
npm i --save condor-framework
npm i --save acl

Usage

  • Copy the acl.proto file.
  • Create your server with the following code:
const acl = require('acl');
const AclServer = require('grpc-acl').AclServer;

// Using memory backend. redis, mongo and others available (See acl module documentation)
const backend = new acl.memoryBackend();

const options = {
  'host': 'localhost',
  'port': 3000,
};

const server = new AclServer(backend, options);
// you can add here your own middleware. (See condor-framework documentation)
server.start();

To call the service:

const caller = require('grpc-caller');
const client = caller('localhost:3000', './acl.proto', 'AclService');
client.addUserRoles({'user': 'joed', 'roles': ['guest']}).then(() => {
  console.log('done!');
});

To find which methods are implemented take a look at the acl.proto file. They are pretty similar to the ones found in the documentation of the acl module.

You can take the integration test as an example too.

Arguments

  • backend. Check ACL documentation.
  • options.

Options

You can pass any condor options, and also the following:

| Option | Description | Default | |------------------------|----------------------------------------------------------------------------|-------------------------| | aclProtoFilePath | Path to the acl.proto file | ./acl.proto | | aclServiceName | Service name of the AclService (must match to the one in the proto file) | AclService |

License and Credits

MIT License. Copyright 2017

Built by the GRPC experts at Devsu.