How to use the @shopify/sewing-kit-koa.middleware function in @shopify/sewing-kit-koa

To help you get started, we’ve selected a few @shopify/sewing-kit-koa 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 Shopify / quilt / packages / react-server / src / render / render.tsx View on Github external
error.message}`;

      logger.log(errorMessage);
      ctx.status = StatusCode.InternalServerError;

      // eslint-disable-next-line no-process-env
      if (process.env.NODE_ENV === 'development') {
        ctx.body = errorMessage;
      } else {
        ctx.throw(StatusCode.InternalServerError, error);
      }
    }
  }

  return compose([
    sewingKitMiddleware({assetPrefix, manifestPath}),
    renderFunction,
  ]);
}

@shopify/sewing-kit-koa

Easily access Sewing Kit assets from a Koa server

MIT
Latest version published 5 months ago

Package Health Score

59 / 100
Full package analysis

Similar packages