How to use corvid-local-site - 3 common examples

To help you get started, we’ve selected a few corvid-local-site 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 wix-incubator / corvid / packages / corvid-local-testkit / src / Index.bs.js View on Github external
}

var server = {
  startInEditMode: (function (prim) {
      return Testkit$1.startInEditMode(prim);
    }),
  startInCloneMode: (function (prim) {
      return Testkit$1.startInCloneMode(prim);
    })
};

var localTestkit = {
  initSite: initSite,
  server: server,
  siteCreators: CorvidLocalTestUtils.siteCreators,
  localSiteBuilder: Testkit.localSiteBuilder
};

var $$default = localTestkit;

exports.localTestkit = localTestkit;
exports.$$default = $$default;
exports.default = $$default;
exports.__esModule = true;
/* localTestkit Not a pure module */
github wix-incubator / corvid / packages / corvid-local-server / src / server.js View on Github external
await fs.move(siteSrcPath, snapshotFolder);
    await fs.emptyDir(siteSrcPath);
  }

  let localSite, editorServer, adminServer;

  const closeAll = () =>
    Promise.all([
      Promise.resolve(localSite && localSite.close()),
      Promise.resolve(editorServer && editorServer.close()),
      Promise.resolve(adminServer && adminServer.close())
    ]);

  try {
    localSite = await initLocalSiteManager(siteSrcPath, siteBackupPath);
    editorServer = await startSocketServer(DEFAULT_EDITOR_PORT, {
      allowedDomains: ["editor.wix.com"].concat(
        process.env.NODE_ENV === "test" ? ["localhost"] : []
      )
    });
    adminServer = await startSocketServer(DEFAULT_ADMIN_PORT);

    adminServer.io.use(adminTokenMiddleware(adminToken));

    initServerApi(localSite, adminServer, editorServer, !isEdit(options));

    logger.info(
      getMessage("Server_Listening_Log", {
        editorPort: editorServer.port,
        adminPort: adminServer.port
      })
github wix-incubator / corvid / packages / corvid-local-server / src / socket-api / index.js View on Github external
localSite.getSiteDocument().catch(e => {
      if (ParseError.isParseError(e)) {
        notifyAdmin("parse-error", e.path);
      }
      throw e;
    });

corvid-local-site

MIT
Latest version published 3 years ago

Package Health Score

43 / 100
Full package analysis

Similar packages