How to use metro-inspector-proxy - 1 common examples

To help you get started, we’ve selected a few metro-inspector-proxy 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 facebook / metro / packages / metro / src / index.js View on Github external
// Lazy require
  const connect = require('connect');

  const serverApp = connect();

  const {
    attachHmrServer,
    middleware,
    end,
  } = await exports.createConnectMiddleware(config);

  serverApp.use(middleware);

  let inspectorProxy: ?InspectorProxy = null;
  if (config.server.runInspectorProxy) {
    inspectorProxy = new InspectorProxy();
  }

  let httpServer;

  if (
    secure &&
    typeof secureKey === 'string' &&
    typeof secureCert === 'string'
  ) {
    httpServer = https.createServer(
      {
        key: fs.readFileSync(secureKey),
        cert: fs.readFileSync(secureCert),
      },
      serverApp,
    );

metro-inspector-proxy

🚇 Inspector proxy for React Native and dev tools integration.

MIT
Latest version published 1 year ago

Package Health Score

82 / 100
Full package analysis

Popular metro-inspector-proxy functions