Running this Lando setup will install a Drupal 8 site behind an nginx server, a MariaDB, and a Node server sharing a development version of Create React App at :3333.
- Clone this repo.
- Run
lando start
to build the containers. - Open your browser to
http://cms.decoupled.lndo.site/
and run a standard install. - Enable the JSONAPI and JSONAPI extra modules with
lando drush en jsonapi jsonapi_extras
- Create some Articles in the Drupal site with path aliases.
- In a separate terminal window, run
lando yarn start
to begin the React development server. - If Articles exist, you should see them at
http://decoupled.lndo.site:3333/
or a banner will appear with the error from the request.
The environment is setup with all of your Drupal code in the backend folder and the React code in the frontend folder.
Current Composer, Drush, Node, npm, and Yarn are available and connected to their service.
This Drupal build uses the Drupal Composer structure, so all new modules should be added with lando composer require
.
Drush is available for the Drupal build. To run a command like clear cache, use lando drush cr
. Any default Drush command should be available using lando drush <command>
The Create React app is installed and run using Yarn. Any Yarn command can be run using yarn <command>
. For example, if you have stopped the development server and want to restart it, just use lando yarn start
.
This was inspired by https://github.com/WondrousLLC/decoupled-drupal-test but after needing to cut out all the Platform.sh code and adding React I decided to create it as it's own repo.