0.0.9 • Published 10 months ago

spdy-nest v0.0.9

Weekly downloads
-
License
MIT
Repository
github
Last release
10 months 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.9

10 months ago

0.0.8

3 years ago

0.0.7

3 years ago

0.0.6

3 years ago

0.0.5

3 years ago

0.0.4

3 years ago

0.0.3

3 years ago

0.0.2

3 years ago

0.0.1

3 years ago