Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@p4d/hermes-nodejs

Package Overview
Dependencies
Maintainers
4
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@p4d/hermes-nodejs

Hermes messaging library - server version

  • 1.4.0
  • latest
  • npm
  • Socket score

Version published
Maintainers
4
Created
Source

Hermes NodeJS Package

Description

Small NPM package that forwards event messages to the queue server (RPi-Queue) through a socket server on port 9999.

Installation

npm install --save @p4d/hermes-nodejs

Usage

Require package

	const Hermes = require('@p4d/hermes-nodejs')

Create hermes object

	// Specifying configuration
	var hermes = new Hermes({
		type: 'testAppData',
		project: {
			id: 'test_project',
			name: 'Test Project'
		},
		kronosId: 'abc123'
	})

	// Using default RPi information (Requires properly configured Raspberry Pi)
	var hermes = new Hermes({
		type: 'testAppData'
	})

To configure RPi use rpi-config.

Send events

	hermes.send(data)

Where data is a JSON object.

Full example

	const Hermes = require('@p4d/hermes-nodejs')

	var hermes = new Hermes({
		type: 'testAppData',
		project: {
			id: 'test_project',
			name: 'Test Project'
		},
		kronosId: 'abc123'
	})
	var data = {
		name: 'new_experience',
		experience_id: 2
	}
	hermes.send(data)

Limitations

This module requires that the queue server is correctly configured. It does not send messages on it's own. For documentation on the queue server see: RPi-Queue

Keywords

FAQs

Package last updated on 12 Sep 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc