<aside> 💡 This document is a pretty version of the script for setting up a vanilla Drupal site.
</aside>
drupal/rest
)drupal/restui
)drupal/entity
)drupal/user_registrationpassword
)drupal/serialization
)composer require league/oauth2-server
composer require drupal/consumers
composer require steverhoades/oauth2-openid-connect-server
[ ] mkdir modules/custom && cd modules/custom
[ ] Simple OAuth git clone [<https://git.drupalcode.org/project/simple_oauth>](<https://git.drupalcode.org/project/simple_oauth>)
[ ] User registration password REST git clone <https://github.com/FlumensIO/user_registrationpassword_rest
>
[ ] Indicia API v2 git clone <https://github.com/Indicia-Team/drupal-8-module-indicia-api> indicia_api
<aside>
💡 If indicia_api
module already exists then clone to indicia_api_v2
and cd
to it, then:
find . -type f -exec sed -i '' -e "s/indicia_api/indicia_api_v2/g" {} \\;
(ignore the errors :)for i in *; do; mv $i $(echo $i | sed "s/indicia_api/indicia_api_v2/"); done
</aside>[ ] Indicia forms git clone --recurse-submodules -j8 <https://github.com/Indicia-Team/drupal-8-module-iform> iform
[ ] Remove all .git
subfolders from custom modules rm -rf */.git
cd simple_oauth
curl <https://raw.githubusercontent.com/FlumensIO/simple_oauth_patches/main/simple_oauth.patch> | git apply -v
sites/default/services.yml
. If the file missing then copy from default.services.yml
cors.config:
enabled: true
# Specify allowed headers, like 'x-allowed-header'.
allowedHeaders: ['authorization', 'x-api-key', 'content-type']
# Specify allowed request methods, specify ['*'] to allow all possible ones.
allowedMethods: ['GET', 'POST', 'PUT', 'OPTIONS', 'DELETE']
# Configure requests allowed from specific origins.
allowedOrigins: ['*']
# Sets the Access-Control-Expose-Headers header.
exposedHeaders: false
# Sets the Access-Control-Max-Age header.
maxAge: false
# Sets the Access-Control-Allow-Credentials header.
supportsCredentials: false