Express instance
In order to have a full control of the express lifecycle, you can pass a self-created instance as a second argument of the NestFactory.create() method.
TypeScript
const server = express();
const app = await NestFactory.create(ApplicationModule, server);