Skip to content

Understanding the CSS code #8

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
michielbdejong opened this issue Dec 4, 2024 · 6 comments
Closed

Understanding the CSS code #8

michielbdejong opened this issue Dec 4, 2024 · 6 comments

Comments

@michielbdejong
Copy link
Owner

The ServerInitializer starts the server. https://communitysolidserver.github.io/CommunitySolidServer/latest/architecture/features/initialization/ explains it well.

HandlerServerConfigurator is chosen
in config/http/server-factory/configurator/default.json and it seems to be the main place where http requests are served, and for instance a 500 error is thrown if it all goes haywire.

@michielbdejong
Copy link
Owner Author

I now know three ways to overwrite parts of the config tree:

  • for a root-level config file, copy-and-paste it into your own repo and then refer to it from your root config.
  • for a non-root config, do the same but then copy-paste all in-between configs. I tried this with where I copy-pasted 4 whole config files, which definitely feels like an anti-pattern):
    • config/identity/handler/default.json (root-level config)
    • config/identity/handler/routing/default.json
    • config/identity/handler/routing/oidc/main.json
    • config/identity/handler/routing/oidc/consent.json
  • add an override to the graph

I'll read more about Components.js config file syntax to try to learn how to override defaults more surgically.

@michielbdejong
Copy link
Owner Author

I'm not seeing https://componentsjs.readthedocs.io/en/latest/configuration/components/general/ getting used in CSS config files

@michielbdejong
Copy link
Owner Author

It's used in:

  • src/init/AppRunner.ts
  • src/init/cluster/SingleThreaded.ts
  • src/pods/generate/BaseComponentsJsFactory.ts
  • in the tests

And I guess it:

  • loads all the singleton components, starts them, and connects them with each other.
  • gives each component its configuration
  • acts almost as code for things like WaterfallHandlers etc

It doesn't deal so much with LSD modules and components as such, I guess.

Now that means I can still use the three methods I described above, but I would love to find some more knowledge about how to use overrides to efficiently (surgically) deviate from a default configuration.

@michielbdejong
Copy link
Owner Author

@michielbdejong
Copy link
Owner Author

@michielbdejong
Copy link
Owner Author

And I think here I finally found a perfect example of what I'll want to do often in Pivot.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant