How to configure root url

Created on 28 June 2024, 2 months ago
Updated 29 June 2024, 2 months ago

Hi folks, trying to get storybook set up for the first time.

When I use the drush storybook:generate-all-stories command, the resulting json defines the following server url:

{
  "title": "Components\/Button",
  "parameters": {
    "server": {
      "url": "http:\/\/default\/storybook\/stories\/render"
    }
  },
...

If I manually update the json to change 'default' to 'mysite.local' it works fine.

Is there a place where I should have defined the root url?

Thanks in advance for any guidance!

πŸ’¬ Support request
Status

Active

Version

1.0

Component

Documentation

Created by

πŸ‡¨πŸ‡¦Canada mrogers

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @mrogers
  • πŸ‡ΊπŸ‡¦Ukraine NightAr Kharkiv

    Hello, this is issue not of this module. This just drush working.

    You can modify it by 2 solutions:

    1. When you use the drush command drush storybook:generate-all-stories, add global parramaeter for setting you uri(--uri=SITE_URI). it should be like:
        drush storybook:generate-all-stories --uri=https:\\your_project.test
      
    2. Second solution is set you the URI only once. In this case, you should create the drush settings file in your current Drupal root folder: drush/drush.yml. For example, in my case it will be /home/snight/projects/your_project/drush/drush.yml where /home/snight/projects/your_project is your_project root folder. For this file you should add options for your uri:
    options:
      uri: 'https://test_project.test'
    

    In some cases its need to run clear cache command: drush cc drush

  • πŸ‡¨πŸ‡¦Canada mrogers

    Thanks so much for the advice.

Production build 0.71.5 2024