0.0.8 • Published 2 years ago

spdy-nest v0.0.8

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

Description

Installation

$ npm install spdy-nest

Usage

Implementation is almost identical to the documentation on using HTTPS in Nest.

import { NestFactory } from '@nestjs/core';
import { ExpressAdapter } from '@nestjs/platform-express';
import { AppModule } from './app.module';
const spdyNest = require('spdy-nest');
const cors = require('cors');
const express = require('express');
const server = express();

// paths to certificates
const httpsOptions = {
  key: './secrets/private-key.pem',
  cert: './secrets/public-certificate.pem',
};

async function bootstrap() {
  // enable cors
  server.use(cors());

  const app = await NestFactory.create(AppModule, new ExpressAdapter(server));
  await app.listen(3000);

  await spdyNest(httpsOptions, server, 443);
}

bootstrap();
0.0.8

2 years ago

0.0.7

2 years ago

0.0.6

2 years ago

0.0.5

2 years ago

0.0.4

2 years ago

0.0.3

2 years ago

0.0.2

2 years ago

0.0.1

2 years ago