How to use the @automattic/vip-go.server function in @automattic/vip-go

To help you get started, we’ve selected a few @automattic/vip-go examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github alleyinteractive / irving / packages / vip-go / server / startServer.js View on Github external
module.exports = function startServer(app) {
  let vipServer;

  if ('development' !== NODE_ENV) {
    vipServer = server(app, { PORT });
    vipServer.listen();
  }

  return vipServer;
};
github alleyinteractive / irving / packages / vip-go / server / createServer.js View on Github external
const os = require('os');
    const fs = require('fs');
    const path = require('path');

    const key = fs.readFileSync(
      path.join(os.homedir(), HTTPS_KEY_PATH),
      'utf8'
    );
    const cert = fs.readFileSync(
      path.join(os.homedir(), HTTPS_CERT_PATH),
      'utf8'
    );

    irvingServer = https.createServer({ key, cert }, app);
  } else {
    irvingServer = server(app, { PORT });
  }

  return irvingServer;
};

@automattic/vip-go

Node package helpers for the VIP Go platform

ISC
Latest version published 4 years ago

Package Health Score

52 / 100
Full package analysis

Similar packages