encore.dev/service

Classes

Service

Defines an Encore backend service.

Use this class to define a new backend service with the given name. The scope of the service is its containing directory, and all subdirectories.

It must be called from files named encore.service.ts, to enable Encore to efficiently identify possible service definitions.

Constructors

Constructor

new Service(name, cfg?): Service

Parameters
name

string

cfg?

ServiceConfig

Returns

Service

Properties

cfg

readonly cfg: ServiceConfig

name

readonly name: string

Interfaces

ServiceConfig

Properties

middlewares?

optional middlewares?: Middleware[]