Skip to content

Using Create-React-App and Drupal 8.5.4 create a headless CMS.

Notifications You must be signed in to change notification settings

SamuelWitke/Simple-Headless-Drupal

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 

Repository files navigation

Why headless CMS over decoupled CMS.

Headless CMS architecture is rising in popularity in the development world. This model allows breakthrough user experiences, gives developers the great flexibility to innovate, and helps site owners future-proof their builds by allowing them to refresh the design without re-implementing the whole CMS. img

Simple Headless Drupal 8.5.4 and Create-React-App Application

Backend

cd backend
composer install
(Optional)
drush si config_installer -y --account-name=admin --account-pass=admin
or navigate to your site and follow Drupal installation instructions.

Frontend

npm i 
npm start

This project template provides a starter kit for managing your site dependencies with Composer.

If you want to know how to use it as replacement for Drush Make visit the Documentation on drupal.org.

Starting Over

Backend

First you need to install composer.

Note: The instructions below refer to the global composer installation. You might need to replace composer with php composer.phar (or similar) for your setup.

After that you can create the project:

composer create-project drupal-composer/drupal-project:8.x-dev some-dir --stability dev --no-interaction

With composer require ... you can download new dependencies to your installation.

Using graphql

cd backend 
composer require drupal/graphql
(Optional)
composer update

Frontend

create-react-app frontend
cd frontend
npm i
npm start