@dataweavers/spark-nextjs
v0.0.46
Published
NextJS module to accept on-demand regeneration requests, containing a payload specifying which sites and url paths need to have their statically generated pages invalidated and/or regenerated.
Readme
Dataweavers Spark
This package is to be used in conjunction with the Dataweavers Spark product.
For more information on Spark please visit https://www.dataweavers.com/products/spark
Module Setup
Add the Dataweavers NPM repository
Setup or create a .npmrc file in the root of your next.js application. Add the following registry reference
@dataweavers:registry=https://pkgs.dev.azure.com/dataweavers/Public/_packaging/DataweaversPublic@Release/npm/registry/Install the module
In a PowerShell terminal, navigate to the root of your next.js application.
Run
npm install @dataweavers/spark-nextjsSet the Spark API Key
Set the environment variable for the Next.js application to the Edge API Key provided by your Spark Subscription Environment (https://app.spark.dataweavers.io/)
- Variable name:
SPARK_REGENERATION_SECRET - Variable value:
[provided in the Spark Application]
- Variable name:
(optional) Set the log level for Spark
Set the environment variable for the Next.js application for the Spark log level.
Spark provides logging in order to understand the process it goes through in the headless environment.
- Variable name:
SPARK_LOG_LEVEL - Variable value:
DEBUG|INFO|WARN|ERROR|SILENT
Default value is: INFO
- Variable name:
