Options
All
  • Public
  • Public/Protected
  • All
Menu

External module "ssr"

Index

Variables

Const app

app: Express = express()

express app instance

Const db

db: Firestore = admin.firestore()

firestore instance

Const indexHtml

indexHtml: any

index.html files

Const serverJS

serverJS: any

server.js objects

Const ssr

ssr: TriggerAnnotated & function = functions// .region('europe-west1')// .runWith({ memory: '1GB', timeoutSeconds: 120 }).https.onRequest(app)

ssr function

Const uniqueKeyFor404

uniqueKeyFor404: ""do-not-remove-me-this-is-for-only-get-404-error-on-ssr-with-unique-and-hidden-key"" = ""do-not-remove-me-this-is-for-only-get-404-error-on-ssr-with-unique-and-hidden-key""

unique key to manage 404 pages

Functions

Const checkFirstResponse

  • checkFirstResponse(req: express.Request, res: express.Response): Promise<any>
  • check first responses for requested url

    Parameters

    • req: express.Request
    • res: express.Response

    Returns Promise<any>

Const getDocumentID

  • getDocumentID(req: express.Request): string
  • get document ID

    Parameters

    • req: express.Request

    Returns string

Const getLocale

  • getLocale(req: express.Request): string
  • get current locale

    Parameters

    • req: express.Request

    Returns string

Const getSSR

  • getSSR(req: express.Request, res: express.Response): Promise<void>
  • get SSR result

    Parameters

    • req: express.Request
    • res: express.Response

    Returns Promise<void>

Const isUrlValid

  • isUrlValid(req: express.Request, res: express.Response): Promise<boolean>
  • check if requested URL is valid

    Parameters

    • req: express.Request
    • res: express.Response

    Returns Promise<boolean>

Const respondToSSR

  • respondToSSR(req: express.Request, res: express.Response, html: string): FirstResponseModel

Const send404Page

  • send404Page(req: express.Request, res: express.Response): Promise<void>
  • send 404 page to request

    Parameters

    • req: express.Request
    • res: express.Response

    Returns Promise<void>

Generated using TypeDoc