- Clone this repo:
git clone git@github.com:pantheon-systems/decoupled-drupal-frontend-demo.git
- Install node modules
cd decoupled-drupal-frontend-demo && npm install
- update following lines in
.env.local
BACKEND_URL=
FRONTEND_URL=
IMG_DOMAIN=
PREVIEW_SECRET=
CLIENT_ID=
CLIENT_SECRET=
# this value can also bet set in the command line
# before running commands for example
# FRONTEND_URL=example.com npm run build
FRONTEND_URL=
-
run
lando start
-
open browser and type
http://drupalnext.lndo.site/
.
The Pantheon @pantheon-systems/drupal-kit is included as a dependency in this project. This allows developers to make use of utility functions to simplify the process of building and maintaining a decoupled site on Pantheon, including:
- addSurrogateKeyHeader()
- updateMaxAge()
Full documentation can be found at: https://github.com/pantheon-systems/decoupled-kit-js/packages/drupal-kit
- examples/auth-api - a simple example that sources data from an endpoint that requires authorization.