A demo setup for testing https://www.drupal.org/project/lupus_decoupled
This is simply a new nuxt (v2) project with https://github.com/drunomics/nuxtjs-drupal-ce installed and configured.
-
Launch it on Gitpod - together with a Drupal backend! This is a fully working setup and does not require any manual setup!
-
Or clone the repo and launch it locally.
For stackblitz or local setup you'll get some network error until base URLs are set right. To do so:
- Set the Drupal base URL in
nuxt.config.js
and append the API-prefix /ce-api, e.g.https://8080-shaal-drupalpod-8m3z0ms7mb6.ws-eu67.gitpod.io/ce-api
When using a Drupal gitpod/DrupalPod as a backend, make sure to set your environment to "Shared" via the workspace options menu, as found in the dashhboard at https://gitpod.io. That way the frontend can connect to it. - Set the frontend base URL in Drupal at
/admin/config/system/lupus-decoupled/settings
, e.g.https://nuxt-starter-wuxxcy--3000.local-corp.webcontainer.io
- Test it. Best add some content nodes and some menu-items pointing to them. /node/1 of the backend is available under /node/1 in the frontend. You should see some naked frontend with menus, breadcrumbs & basic node-content (body field) working.
-
Clone the repo
-
Run:
npm install npm run dev
Check out the nuxt docs to get started, e.g. Commands and Deployment