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

caesarjs

v0.7.1

Published

A microservice framework for node.js implementing client-server mutual certificate authentication

Downloads

4

Readme

caesarjs v0.7.1

Caesar js is a microservice framework for node.js

Caesar.js Project's homepage

https://caesarjs.com/

Project Documentation

https://caesarjs.com/api-documentation/

Key Concepts

###Pattern Matching Objects Pattern matching objects instead of URLs. When defining a server-based service the API user provides an object pattern. While caesarjs server will create an internal url for the service, the client won’t need to know about it. The API user will have to provide the object pattern so the client can work out the actual URL for the required service. The pattern matching is based on the patrun module and defines 2 basic rules:

  1. More specific matches beat less specific matches. That is, more property values beat fewer.
  2. Property names are checked in alphabetical order.

Mutual Data Encryption

Data is encrypted when exchanged between server and client. This feature works out of the box.

Mutual Certificate Authentication

Caesar.js client & server can be easily configured to securely communicate via the SSL/HTTPS channel and perform mutual authentication.

Built in endpoint metrics, stats

Caesar.js features a number of build in server endpoints returning performance metrics for specific endpoints, usage count stats for each endpoint and overall daily count.

Built in option to limit endpoints daily usage

You can limit the number of daily endpoint calls by setting a simple 'maxNumberOfRequests' request option at server level.

Built on top of Express and Request

Caesar.js is built on top of the node.js’s community widely used Express server and Request client.

Dead easy API

Client & server feature a very comprehensive, easy to understand API.

A quick code example for server & client APIs

const server = require('caesarjs').server;
const client = require('caesarjs').client;

const encryptorKey = '33a24560-a43b-44cc-b2bc-9cc0de14a093';

new server(3000, {encryptorKey}).add(
    {role: 'calculator', operation: 'sum'},
    (req, res) => {
        let n1 = req.data.n1;
        let n2 = req.data.n2;
        let sum = (n1 + n2);
        res.caesarJson({sum});
    })
.add(
    {role: 'calculator', operation: 'subtraction'},
    (req, res) => {
        let n1 = req.data.n1;
        let n2 = req.data.n2;
        let subtraction = (n1 - n2);
        res.caesarJson({subtraction});
    })
.listen();

let cclient = null;
new client('localhost', 3000, {encryptorKey})
                .init()
                .then( (client) => {
                    cclient = client;
                    return cclient.call({role: 'calculator', operation: 'sum'}, {n1: 10, n2: 10});
                }).then( (resp) => {
                    console.log('SUM', resp);
                    return cclient.call({role: 'calculator', operation: 'subtraction'}, {n1: 100, n2: 10});
                }).then( (resp) => {
                    console.log('SUBTRACTION', resp);
                }).catch( (err) => console.log(err) );