0.1.0 • Published 8 years ago

h2io-express-server v0.1.0

Weekly downloads
-
License
ISC
Repository
-
Last release
8 years ago

H2io - Express server setup

Installation

npm install h2io-express-server

Usage

import {
  middleware,
  setupHttp,
  setupHttps,
} from 'h2io-express-server';

// Express
import express from 'express';
const app = express();

// Use all middlewares
app.use(...middleware);

const config = {
  hostname: '0.0.0.0',
  port: 8080,
}
// Http instance
const http = setupHttp(config, app);

const config = {
  hostname: '0.0.0.0',
  port: 8080,
  ssl: {
    path: './ssl',
    key: 'ssl.key',
    cert: 'ssl.crt',
    ca: 'ssl.ca',
  },
}
// Https instance
const https = setupHttps(config, app);
0.1.0

8 years ago

0.0.1

8 years ago