EdgeStore
Learn about the EdgeStore provider and its configuration options for customizing your EdgeStore integration.
The hosted edgestore() provider uses EdgeStore API v2. Configure it together
with your router, then pass that configured instance to the HTTP adapter.
import { createEdgeStore, initEdgeStore } from '@edgestore/server';
import {
createEdgeStoreNextHandler,
type CreateContextOptions,
} from '@edgestore/server/adapters/next/pages';
import { edgestore } from '@edgestore/server/providers/edgestore';
import { z } from 'zod';
const configuredEdgeStore = createEdgeStore({
router,
provider: edgestore(),
});
export default createEdgeStoreNextHandler<Context>({
edgestore: configuredEdgeStore,
createContext,
});Options
export type EdgeStoreProviderOptions = {
/**
* Access key for your EdgeStore project.
* Can be found in the EdgeStore dashboard.
*
* This can be omitted if the `EDGE_STORE_ACCESS_KEY` environment variable is set.
*/
accessKey?: string;
/**
* Secret key for your EdgeStore project.
* Can be found in the EdgeStore dashboard.
*
* This can be omitted if the `EDGE_STORE_SECRET_KEY` environment variable is set.
*/
secretKey?: string;
/**
* Override the API v2 base URL.
*/
apiUrl?: string;
};