SRS is built using the Next.js framework. It comes with a complete workflow for working with environment variables. You can read more at these documentation pages.
All available options to change via environment variables can be found in the .env
file.
For local development, we recommend configuration via the .env.local
file:
- Create
.env.local
in the root of the project - Add entry
NEXT_PUBLIC_API_URI=https://my-saleor-instance/graphql/
- If dev server was running, new values will be loaded after the server restart
Git ignores the .env.local
file to ensure that the local configuration is not exposed.
For application deployments, we suggest setting environment variables instead of files. The way you can set them varies depending on the hosting provider. In the case of using Vercel, related documentation can be found here.
The list of available channels can be changed by adding new entries to the CHANNELS
constant located in the lib/regions.ts
file.
To configure available languages, read translation docs.
The homepage will show content blocks based, by default, on the Menu object fetched from the API. Slug of the object can be configured with the NEXT_PUBLIC_HOMEPAGE_MENU
variable.