EdgeStore
Learn about the EdgeStore provider and its configuration options for customizing your EdgeStore integration.
The hosted EdgeStore provider uses API v2 and is the default for es.router().
No provider configuration is needed when using environment credentials. Chain
.provider(edgestore(options)) to supply custom credentials or an API URL.
import { 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 es = initEdgeStore.context<Context>().create();
const router = es.router({
publicFiles: es.fileBucket(),
}).provider(edgestore());
export default createEdgeStoreNextHandler<Context>({
router,
createContext,
});Options
export type EdgeStoreProviderOptions = {
/**
* Access key for your EdgeStore project.
* Can be found in the EdgeStore dashboard.
*
* This can be omitted if the `EDGESTORE_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 `EDGESTORE_SECRET_KEY` environment variable is set.
*/
secretKey?: string;
/**
* Override the API v2 base URL.
*/
apiUrl?: string;
};