- Docker infrastructure (Dockerfile, docker-compose.yml, genieacs-sim) - AdonisJS v7 app with Inertia.js + Vue 3 - MongoDB integration - CWMP/TR-069 state machine engine - Configuration engine with compliance tracking - Branding: ADAM ACS (favicon, navbar, locales) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
20 lines
619 B
TypeScript
20 lines
619 B
TypeScript
import { Logger } from '@adonisjs/core/logger'
|
|
import { HttpContext } from '@adonisjs/core/http'
|
|
import { type NextFn } from '@adonisjs/core/types/http'
|
|
|
|
/**
|
|
* The container bindings middleware binds classes to their request
|
|
* specific value using the container resolver.
|
|
*
|
|
* - We bind "HttpContext" class to the "ctx" object
|
|
* - And bind "Logger" class to the "ctx.logger" object
|
|
*/
|
|
export default class ContainerBindingsMiddleware {
|
|
handle(ctx: HttpContext, next: NextFn) {
|
|
ctx.containerResolver.bindValue(HttpContext, ctx)
|
|
ctx.containerResolver.bindValue(Logger, ctx.logger)
|
|
|
|
return next()
|
|
}
|
|
}
|