# HttpsServer Decorator

Module
import { HttpsServer } from "@tsed/common"
Source/packages/common/src/platform-builder/decorators/httpsServer.ts

# Overview

type HttpsServer = Https.Server & IHttpsFactory;
function HttpsServer(target: Type<any>, targetKey: string, descriptor: TypedPropertyDescriptor<Function> | number): any;

# Description

Inject the Https.Server instance.

# Example

import {HttpsServer, Service} from "@tsed/common";

@Service()
export default class OtherService {
   constructor(@HttpsServer httpServer: HttpServer) {}
}
1
2
3
4
5
6

Note: TypeScript transform and store HttpsServer as Function type in the metadata. So to inject a factory, you must use the @Inject(type) decorator.