Skip to main content

site

Overview of the site module in the @serverless-stack/node package.

import { ... } from "@serverless-stack/node/site"

The site module has the following exports.


Properties

The properties let you access the resources that are bound to the function.


StaticSite

This module helps with accessing StaticSite constructs.

import { StaticSite } from "@serverless-stack/node/site";

url

Type : string

The URL of the site. If custom domain is enabled, this is the custom domain URL of the site.

console.log(StaticSite.myWeb.url);

ViteStaticSite

This module helps with accessing ViteStaticSite constructs.

import { ViteStaticSite } from "@serverless-stack/node/site";

url

Type : string

The URL of the site. If custom domain is enabled, this is the custom domain URL of the site.

console.log(ViteStaticSite.myWeb.url);

ReactStaticSite

This module helps with accessing ReactStaticSite constructs.

import { ReactStaticSite } from "@serverless-stack/node/site";

url

Type : string

The URL of the site. If custom domain is enabled, this is the custom domain URL of the site.

console.log(ReactStaticSite.myWeb.url);

NextjsSite

This module helps with accessing NextjsSite constructs.

import { NextjsSite } from "@serverless-stack/node/site";

url

Type : string

The URL of the site. If custom domain is enabled, this is the custom domain URL of the site.

console.log(NextjsSite.myWeb.url);

RemixSite

This module helps with accessing RemixSite constructs.

import { RemixSite } from "@serverless-stack/node/site";

url

Type : string

The URL of the site. If custom domain is enabled, this is the custom domain URL of the site.

console.log(RemixSite.myWeb.url);