# Getting started

DruxtJS requires a NuxtJS frontend and a Drupal JSON:API enabled backend:

# Drupal

  1. Install Drupal (opens new window)

  2. Download the Drupal Druxt module (opens new window):

    composer require drupal/druxt
    
    1
  3. Install the module: Install the module

  4. Add the "access druxt resources" permission to a user/role: Install the module

  5. Enable and configure CORS in the your sites services.yml file.

# Nuxt

  1. Install NuxtJS (opens new window)

  2. Install the DruxtJS Site module (opens new window):

    npm i druxt-site
    
    1
  3. Add the module and configuration to nuxt.config.js:

    module.exports = {
      modules: [
        'druxt-site'
      ],
    
      druxt: {
        baseUrl: 'https://demo-api.druxtjs.org'
      }
    }
    
    1
    2
    3
    4
    5
    6
    7
    8
    9
  4. Add the DruxtSite component to your page or layout:

    <template>
      <DruxtSite :theme="theme" />
    </tempalte>
    
    1
    2
    3
Last Updated: 12/17/2020, 10:44:18 PM