Terminates the application (including NestApplication, Gateways, and each connected microservice)
Connects microservice to the NestApplication instance. Transforms application to a hybrid instance.
Microservice options object
Hybrid options object
Enables CORS (Cross-Origin Resource Sharing)
Enables the usage of shutdown hooks. Will call the
onApplicationShutdown
function of a provider if the
process receives a shutdown signal.
The Nest application context instance
Returns the underlying HTTP adapter.
Returns the underlying native HTTP server.
Returns array of the microservices connected to the NestApplication.
Returns the url the application is listening at, based on OS and IP version. Returns as an IP value either in IPv6 or IPv4
The IP where the server is listening
Initalizes the Nest application. Calls the Nest lifecycle events. It isn't mandatory to call this method directly.
The NestApplicationContext instance as Promise
Starts the application.
Optional callback
A Promise that, when resolved, is a reference to the underlying HttpServer.
Starts the application (can be awaited).
(optional)
Registers the request/context object for a given context ID (DI container sub-tree).
Resolves transient or request-scoped instance of either injectable or controller, otherwise, throws exception.
Allows navigating through the modules tree, for example, to pull out a specific instance from the selected module.
Registers a prefix for every HTTP route path.
The prefix for every HTTP route path (for example /v1/api
)
Starts all connected microservices asynchronously.
Optional callback function
Starts all connected microservices and can be awaited.
A wrapper function around HTTP adapter method: adapter.use()
.
Example app.use(cors())
Registers exception filters as global filters (will be used within every HTTP route handler)
Registers guards as global guards (will be used within every HTTP route handler)
Registers interceptors as global interceptors (will be used within every HTTP route handler)
Registers pipes as global pipes (will be used within every HTTP route handler)
Sets custom logger service
Setup Ws Adapter which will be used inside Gateways.
Use when you want to override default socket.io
library.
Generated using TypeDoc
Interface defining the core NestApplication object.