0.2.6 • Published 4 months ago

@vtex/raccoon-dev-proxy v0.2.6

Weekly downloads
-
License
-
Repository
github
Last release
4 months ago

@vtex/raccoon-dev-proxy

Attention! This package should only be used by applications that opted-in to use the Raccoon Proxy (not related to the raccoon-proxy package).

This package contains the implementation of a proxy to VTEX services to be used only in development. It is used to successfully grab VTEX resources while in development mode. It is not available in production.

Why are we using Next.js Pages router and not the App router here? Because the http-proxy-middleware library, which abstracts away much of what we need to do to create a proxy, is not compatible with the App router. Should we rewrite this to the App router eventually? Maybe. For now, this is the most efficient way to get a proxy up and running.

Usage

This file must be rewritten as the pages/api/dev/proxy/[...routes].ts file. Everything that needs to go through the proxy must be prefixed with /api/dev/proxy. For example, to proxy a request to https://storecomponents.myvtex.com/admin, you would use /api/dev/proxy/admin.

What happens in production?

In production, this proxy is not available. Lambda functions to serve Next.js Admin Apps (Raccoon) under *.myvtex.com will take care of replacing this proxy is production.

0.2.6

4 months ago

0.2.5

4 months ago

0.2.4

4 months ago

0.2.3

5 months ago

0.2.2

5 months ago

0.2.1

6 months ago

0.2.0

6 months ago