src/index.js
/**
 * Load federated server module. Call `clear` to delete non-webpack cache if
 * hot reloading. Call `start` to import remote models, adapters, services,
 * set API routes and load persisted data from storage.
 *
 * @param {boolean} hot `true` to hot reload
 */
Load federated server module. Call `clear` to delete non-webpack cache if
hot reloading. Call `start` to import remote models, adapters, services,
set API routes and load persisted data from storage.

@param {boolean} hot `true` to hot reload
Load federated server module . Call ` clear ` to delete non - webpack cache if hot reloading . Call ` start ` to import remote models adapters services set API routes and load persisted data from storage . @param { boolean } hot ` true ` to hot reload
async function startMicroLib({ hot = false } = {}) {
  const remoteEntry = importFresh("./remoteEntry");
  const factory = await remoteEntry.microlib.get("./server");
  const serverModule = factory();
  if (hot) {
    serverModule.default.clear();
  }
  serverModule.default.start(app);
}
async function startMicroLib ( { hot = false } = { } ) { const remoteEntry = importFresh ( "./remoteEntry" ) ; const factory = await remoteEntry . microlib . get ( "./server" ) ; const serverModule = factory ( ) ; if ( hot ) { serverModule . default . clear ( ) ; } serverModule . default . start ( app ) ; }
Load federated server module.
Load federated server module .
// clear cache on hot reload