Registry / devops / orator

orator

JSON →
library6.1.2jsnpmunverified

Orator is a thin abstraction layer over HTTP server implementations (like Restify) for building REST and IPC services. It provides a consistent interface for spinning up web servers with configuration managed through JSON. At version 6.1.2, it supports lifecycle hooks (before/after), static file serving with subdomain-based routing, and integrates with the Fable ecosystem. Unlike Express or Koa, Orator focuses on being unopinionated and composable for microservices. It is released as needed with a moderate cadence.

npm install orator
INSTALL
IMPORT
SIG · ORATOR
O
orator
devopsjavascriptv6.1.2
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

default
const libOrator = require('orator');
Orator exports a constructor as default. Use CommonJS require.
Fable integration
const libFable = require('fable'); const libOrator = require('orator');
Typical usage requires both Fable and a service server implementation.
Service server implementation
const libOratorServiceServerRestify = require('orator-serviceserver-restify');
A service server implementation module (e.g., for Restify) must be instantiated and added as a provider.

Shows minimal setup: create Fable instance, add Orator and Restify service server, define a route, start server.

const libFable = require('fable'); const libOrator = require('orator'); const libOratorServiceServerRestify = require('orator-serviceserver-restify'); const _Fable = new libFable({ Product: 'MyAPIServer', ProductVersion: '1.0.0', ServicePort: 8080 }); _Fable.serviceManager.addServiceType('Orator', libOrator); _Fable.serviceManager.addServiceType('OratorServiceServer', libOratorServiceServerRestify); _Fable.serviceManager.instantiateServiceProvider('Orator'); _Fable.serviceManager.instantiateServiceProvider('OratorServiceServer'); _Fable.Orator.serviceServer.get('/hello/:name', (pRequest, pResponse, fNext) => { pResponse.send({ greeting: `Hello ${pRequest.params.name}!` }); return fNext(); }); _Fable.Orator.startService( () => { console.log('Server is running on port 8080'); });
Debug
Known issues
gotchaOrator requires at least one service server implementation (e.g., orator-serviceserver-restify) to function. Without it, startService will fail.
fix
Install and configure a service server package like orator-serviceserver-restify.
affects: *
gotchaFable is not automatically installed with Orator; you must explicitly install 'fable' package.
fix
Run 'npm install fable' alongside Orator.
affects: *
deprecatedConfiguration key 'APIServerPort' is a legacy alias for 'ServicePort' and will be removed in future versions.
fix
Use 'ServicePort' instead of 'APIServerPort'.
affects: >=6.0.0
gotchaOrator uses Restify under the hood; Restify's request and response objects are used in route handlers. This may differ from Express-style API.
fix
Familiarize yourself with Restify's API, e.g., use pRequest.params for URL parameters, not pRequest.query.
affects: *
Errors
Common errors & fixes
Error: Cannot find module 'orator-serviceserver-restify'
Missing required service server implementation module.
fix
Install the missing module: npm install orator-serviceserver-restify
TypeError: _Fable.Orator is undefined
Orator service provider was not instantiated or added before access.
fix
Ensure you call _Fable.serviceManager.instantiateServiceProvider('Orator') after adding the service type.
Error: listen EADDRINUSE :::8080
Port 8080 is already in use by another process.
fix
Change 'ServicePort' to an available port, or kill the process using that port.
Upgrade
Version history
6.1.2latest on npm
Audit
Dependencies
fableoptionalOrator is designed to work as a service provider within the Fable framework for configuration and lifecycle management
orator-serviceserver-restifyoptionalRequired service server implementation for HTTP servers (Restify)
Agent activity
10 hits · last 30 days
node
8
Amazon
1
Resources
packageorator
orator — npm install orator · libregistry