{"id":48864,"library":"orator","title":"Orator","description":"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.","status":"active","version":"6.1.2","language":"javascript","source_language":"en","source_url":"https://github.com/stevenvelozo/orator","tags":["javascript","rest","api","logging"],"install":[{"cmd":"npm install orator","lang":"bash","label":"npm"},{"cmd":"yarn add orator","lang":"bash","label":"yarn"},{"cmd":"pnpm add orator","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Orator is designed to work as a service provider within the Fable framework for configuration and lifecycle management","package":"fable","optional":true},{"reason":"Required service server implementation for HTTP servers (Restify)","package":"orator-serviceserver-restify","optional":true}],"imports":[{"note":"Orator exports a constructor as default. Use CommonJS require.","symbol":"default","correct":"const libOrator = require('orator');"},{"note":"Typical usage requires both Fable and a service server implementation.","symbol":"Fable integration","correct":"const libFable = require('fable'); const libOrator = require('orator');"},{"note":"A service server implementation module (e.g., for Restify) must be instantiated and added as a provider.","symbol":"Service server implementation","correct":"const libOratorServiceServerRestify = require('orator-serviceserver-restify');"}],"quickstart":{"code":"const libFable = require('fable');\nconst libOrator = require('orator');\nconst libOratorServiceServerRestify = require('orator-serviceserver-restify');\n\nconst _Fable = new libFable({\n\tProduct: 'MyAPIServer',\n\tProductVersion: '1.0.0',\n\tServicePort: 8080\n});\n\n_Fable.serviceManager.addServiceType('Orator', libOrator);\n_Fable.serviceManager.addServiceType('OratorServiceServer', libOratorServiceServerRestify);\n_Fable.serviceManager.instantiateServiceProvider('Orator');\n_Fable.serviceManager.instantiateServiceProvider('OratorServiceServer');\n\n_Fable.Orator.serviceServer.get('/hello/:name',\n\t(pRequest, pResponse, fNext) =>\n\t{\n\t\tpResponse.send({ greeting: `Hello ${pRequest.params.name}!` });\n\t\treturn fNext();\n\t});\n\n_Fable.Orator.startService(\n\t() =>\n\t{\n\t\tconsole.log('Server is running on port 8080');\n\t});","lang":"javascript","description":"Shows minimal setup: create Fable instance, add Orator and Restify service server, define a route, start server."},"warnings":[{"fix":"Install and configure a service server package like orator-serviceserver-restify.","message":"Orator requires at least one service server implementation (e.g., orator-serviceserver-restify) to function. Without it, startService will fail.","severity":"gotcha","affected_versions":"*"},{"fix":"Run 'npm install fable' alongside Orator.","message":"Fable is not automatically installed with Orator; you must explicitly install 'fable' package.","severity":"gotcha","affected_versions":"*"},{"fix":"Use 'ServicePort' instead of 'APIServerPort'.","message":"Configuration key 'APIServerPort' is a legacy alias for 'ServicePort' and will be removed in future versions.","severity":"deprecated","affected_versions":">=6.0.0"},{"fix":"Familiarize yourself with Restify's API, e.g., use pRequest.params for URL parameters, not pRequest.query.","message":"Orator uses Restify under the hood; Restify's request and response objects are used in route handlers. This may differ from Express-style API.","severity":"gotcha","affected_versions":"*"}],"env_vars":null,"search_vec":"'6.1.2':37 'abstract':6 'api':81 'base':49 'before/after':42 'build':15 'cadenc':78 'compos':67 'configur':31 'consist':23 'ecosystem':56 'express':58 'fabl':55 'file':44 'focus':62 'hook':41 'http':9 'implement':11 'integr':52 'interfac':24 'ipc':18 'javascript':79 'json':34 'koa':60 'layer':7 'lifecycl':40 'like':12 'log':82 'manag':32 'microservic':69 'moder':77 'need':74 'orat':1,2,61 'provid':21 'releas':72 'rest':16,80 'restifi':13 'rout':50 'serv':45 'server':10,29 'servic':19 'spin':26 'static':43 'subdomain':48 'subdomain-bas':47 'support':39 'thin':5 'unlik':57 'unopinion':65 'version':36 'web':28","created_at":"2026-06-07T16:58:51.059576+00:00","updated_at":"2026-06-07T16:58:51.059576+00:00","problems":[{"fix":"Install the missing module: npm install orator-serviceserver-restify","cause":"Missing required service server implementation module.","error":"Error: Cannot find module 'orator-serviceserver-restify'"},{"fix":"Ensure you call _Fable.serviceManager.instantiateServiceProvider('Orator') after adding the service type.","cause":"Orator service provider was not instantiated or added before access.","error":"TypeError: _Fable.Orator is undefined"},{"fix":"Change 'ServicePort' to an available port, or kill the process using that port.","cause":"Port 8080 is already in use by another process.","error":"Error: listen EADDRINUSE :::8080"}],"ecosystem":"npm","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":null,"cli_version":null,"type":"library","homepage":"https://github.com/stevenvelozo/orator","github":"https://github.com/stevenvelozo/orator","docs":null,"changelog":null,"pypi":null,"npm":"orator","openapi_spec":null,"status_page":null,"smithery":null,"categories":["devops"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-06-07","next_check":"2026-09-05","install_tag":null}}