Develop revenexx Storefronts

Master site development with revenexx.

Rendering strategies

revenexx allows you to host both statically-generated and server-rendered storefronts.

Static sites are storefronts that are pre-built and served as-is to clients. They do not execute server-side code on each request. They are ideal for use-cases such as Single Page Applications (SPAs), documentation sites, personal blogs, and portfolio storefronts.

Server-side rendered (SSR) sites generate content dynamically on the server and send fully rendered pages for each request. They are ideal for use-cases with substantial dynamic content or server-side processing such as e-commerce platforms, social media applications, content management systems (CMS), and real-time collaboration tools.

You can configure your preferred rendering strategy through the following steps:

  1. Navigate to your storefront on revenexx Console.
  2. Head to the Settings tab > Build settings section.
  3. Select the SSR or the Static checkbox.
  4. Confirm that the appropriate install command, build command, and output directory are set.
  5. (For SPAs) Add a fallback file.
  6. Click on the Update button and redeploy your storefront.

Accessing environment variables

revenexx Storefronts lets you set static environment variables to pass constants and secrets such as API keys, connection strings, etc., to your storefronts.

To set static environment variables, follow these steps:

  1. Navigate to your storefront on revenexx Console.
  2. Head to the Settings tab > Environment variables section.
  3. Click on the Create variable button and add the key and value of the environment variable.
  4. Select the Secret checkbox if you want to prevent any team member from reading the value of the environment variable after creation.
  5. Click on the Create button and redeploy the storefront.

You can also configure global variables that apply to all your storefronts in the Settings of your project.

Secret environment variables

revenexx now allows you create secret environment variables, which are hidden from both the revenexx Console and API. Once a variable is marked as secret, this action cannot be reversed.

You can mark an environment variable as secret either at the time of creation or after it is created.

revenexx-specific environment variables

revenexx passes the following environment variables into every deployed site by default.

VariableDescriptionAvailable at Build and/or Run Time
REVENEXX_SITE_API_ENDPOINTThe API endpoint of the running siteBoth
REVENEXX_SITE_NAMEThe name of the running site.Both
REVENEXX_SITE_DEPLOYMENTThe deployment ID of the running sites.Both
REVENEXX_SITE_PROJECT_IDThe project ID of the running site.Both
REVENEXX_SITE_RUNTIME_NAMEThe runtime name of the running site.Both
REVENEXX_SITE_RUNTIME_VERSIONThe runtime version of the running site.Both
REVENEXX_SITE_CPUSThe CPU (runtime) specification of the running site.Both
REVENEXX_SITE_MEMORYThe memory (runtime) specification of the running site.Both

Timeouts

Each request made to a path on an revenexx Storefront has a set time limit, after which the request will timeout. Here are the steps to configure those timeout period:

  1. Navigate to your storefront on revenexx Console.
  2. Head to the Settings tab > Timeout section.
  3. Add an appropriate time limit (in seconds).

The default timeout is set at 15 seconds and the maximum value possible is 30 seconds.

Resource limits

Under Settings - Resource limits, you can set build and runtime specifications independently. The build spec applies while dependencies are installed and your storefront is built for deployment; the runtime spec applies when your storefront serves traffic, including server-side rendering (SSR). Both use the same CPU and memory tiers on Cloud.

On Revenue Cloud, customizing specifications requires the Pro plan. See Compute for tiers, GB-hours, and pricing.

Project dependencies

To install your dependencies before your storefront is built, you should add the relevant install command to your storefront’s build settings. Here are the steps to add the install command:

  1. Navigate to your storefront on revenexx Console.
  2. Head to the Settings tab > Build settings section.
  3. Confirm that the appropriate install command is set.

Make sure to include dependency files like package.json in your storefront's configured root directory. Do not include the dependency folders like node_modules in your storefront’s root directory. The dependencies installed for your local OS may not work in the storefront's environment.

Your site's dependencies should be managed by the package manager of each language. We include the following package managers and setup commands by default.

FrameworkDefault package managerInstall commandBuild commandOutput directory
Next.jsnpmnpm installnpm run build./.next
Nuxtnpmnpm install or yarn installnpm run build or yarn build./.output
SvelteKitnpmnpm installnpm run build./build
Angularnpmnpm installnpm run build./dist/angular/browser
Astronpmnpm installnpm run build./dist
Remixnpmnpm installnpm run build./build
TanStack Startnpmnpm installnpm run build./dist
Flutterpubflutter pub getflutter build web --release -t lib/main.dart./build/web
React Nativenpmnpm installnpm run build./dist
Other JavaScriptnpm(Empty)(Empty)./
Was this page helpful?