Skip to content

Getting configuration/env variables in frozen world and development environment #1756

@rickmcgeer

Description

@rickmcgeer

What would you like to achieve?
I'm passing a few configuration variables to the world in URL parameters, and getting them consistently is something I could use guidance on. The constraints are:

  • In the frozen world, they need to be available on initialization
  • They need to be settable from function calls /standard JavaScript get/set for development

I have a few options:

  • create an object GALYLEO_ENV with the right properties
  • export the properties from GalyleoStudioWorld extends LivelyWorld where, ideally, they are available as $world variables

At the moment, I'm exporting the GALYLEO_ENV global and initializing it in GalyleoStudioWorld.onLoad() but I would appreciate guidance on how to do it better.

$world.execCommand("open browser", {moduleName: "studio/ui.cp.js", packageName: "engageLively--galyleo-dashboard", codeEntity: "onLoad"});

How are you trying to achieve that

Alternative solutions
If applicable, what other solutions have you tried?

Additional Resources
Please provide links to any custom code that might be necessary to grasp your problem. Screenshots of custom component, etc. are also appreciated.

Version: Please paste the lively.next commit on which the problem occurred here (use the copy button of the Version Checker in the bottom left corner).

Metadata

Metadata

Assignees

No one assigned

    Labels

    📟 support inquiryQuestions that can be answered without changing code

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions