@appneurox/authorization-service
v0.1.0
Published
Authorization Service: NestJS module that runs as its own microservice or inside a modular monolith.
Readme
@appneurox/authorization-service
Authorization Service as one NestJS module. The same code runs in two ways:
| Mode | How | Routes |
| --- | --- | --- |
| Microservice | node dist/standalone.js, deployed at https://authorization-service.appneurox.com | /v1/module, /v1/execute |
| Inside a brand API | servicePackage() mounted by a modular monolith | /authorization-service/v1/module, /authorization-service/v1/execute |
// Brand API (modular monolith)
import { bootstrapMonolith } from '@appneurox/service-composition';
import { servicePackage } from '@appneurox/authorization-service';
await bootstrapMonolith({ services: [servicePackage()] });// Another module in the same process can inject the application directly
import { AuthorizationServiceApplication } from '@appneurox/authorization-service';servicePackage(options) passes options (extra providers, imports, controllers) to
AuthorizationServiceModule.register(), which is how a brand configures this service without forking it.
The host owns HTTP, authentication, tenant context, validation, errors, logging and shutdown
through @appneurox/service-runtime. Importing this package opens no listener.
Status: boilerplate. GET /v1/module works; authorized POST /v1/execute returns
501 NOT_IMPLEMENTED until the business code is written in src/.
Client: @appneurox/authorization-service-sdk.
