0.0.8 • Published 8 years ago

decentraleyes-directory v0.0.8

Weekly downloads
4
License
MIT
Repository
github
Last release
8 years ago

decentraleyes-directory

Decentraleyes.net Directory service reference implementation

Architecture

Every service in Decentraleyes.net is shipped as a standalone module to allow SysOps the freedom to:

  1. Determine whether or not they use each module;
  2. Determine when/if they upgrade them; and
  3. Change or even entirely rewrite them from scratch.

Each service module implements an interface made of public methods and routes. If the public interface is maintained, Decentraleyes.net doesn't care what amount of actual work is performed within the service as long as it succeeds and generates a result expected by the user per the documented interface contract of the service.

For example, a SysOp might not want to use MongoDB or might even want to use a database they created. Such a user could create a new service and write the logic needed to use their custom database while providing service as expected through Decentraleyes.net including beacons, notifications and so on.

service-options.json

The service-options.json file lets the SysOp set certain options that simply don't make sense to store in the database and/or edit (or even expose) through the web front end. Any standard text editor can be used to change the contents of service-options.json. It is simply a JavaScript Object Notation (JSON) file. You are, for example, free to set the value of passwordSalt to a function that does whatever you need done to generate a password salt value.

optionName

Option description.

Methods

The decentraleyes-directory module offers publicly callable JavaScript methods used by code, not by HTTP requests.

load (express, mongoose, app)

Loads the service and configures it for use. The load method compiles the schema and model. Then, it attaches the service's routes to the host application's call chain.

Routes

The decentraleyes-directory module offers publicly callable routes that provide service over standard HTTP requests. A simple JSON API is implemented.

VERB /route

HTTPS RECOMMENDED

Describe the route.

0.0.8

8 years ago

0.0.7

8 years ago

0.0.6

8 years ago

0.0.5

8 years ago

0.0.4

8 years ago

0.0.3

8 years ago

0.0.2

8 years ago