Would like a public URL for the storybook using cl_server.
However, currently, this project is focused on Storybook for the development (local) environment.
Using it in a development environment requires disabling all caches on the component rendering endpoint. This is necessary to allow hot reloading when working locally.
The following is required for the cl_server storybook to work:
- Permission to use the CL Server endpoint set to Anonymous user
- The following needs to be set in services.yml
parameters:
twig.config:
debug: true
cache: false
cors.config:
enabled: true
allowedHeaders: ['*']
allowedMethods: ['*']
allowedOrigins: ['*']
exposedHeaders: false
maxAge: false
supportsCredentials: true
services:
cache.backend.null:
class: Drupal\Core\Cache\NullBackendFactory
No ideal to disable the cache on production environments.
Issue fork cl_server-3385428
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
andysipple commentedComment #3
andysipple commentedComment #4
paulsheldrake commentedI think there is the potential deal with this on the storybookJS side. Have made a feature request in the https://github.com/Lullabot/storybook-drupal-addon/issues/42 package
We could then leave all the Drupal stuff as is and compile a static version locally or through a build process without having to get funky with settings and config.
Comment #5
agarzola commentedThat is a good feature request on its own, but I think being able to use cl_server in production would still be helpful for anyone who wants to be able to render components with arbitrary data (e.g. à la Storybook controls) in production.
Comment #6
e0ipsoComment #8
e0ipsoComment #9
e0ipsoComment #10
e0ipsoMerging.
Comment #12
e0ipsoComment #13
e0ipso