← Home

Elder.js Hook: requestComplete

requestComplete : This hook marks the end of the request lifecycle.

This hook is triggered on an individual 'request object' completing whether Elder.js is being used in the "build" or a "server" mode.

  • Internally, Elder.js uses this hook to write html to the "public folder".
  • Useful for uploading static html to s3 or another source.
  • Could also be used to write the output of a route's "data" function file to help with client site routing if you were so inclined.
  • This hook may also be used by plugins to clean up any request specific 'state' they have stored.
  • By default Elder.js adds a hook here to all server requests that outputs how long the request took to generate. If you want to see detailed output from this hook set debug.speed = true in your config file.
Props :
perf
request
htmlString
query
settings
errors
timings
data
Mutable :
errors
Stable · Location: Page.ts
Elder.js hook Lifecycle