How to make self-hosted server support multiple scopes
Description
Hello!
I tried to set up a self-hosted server, but it just support single scope. How should I set multiple scopes at the server? Bit.dev distinguish scopes by using different subdomain name. I'm curious why used subdomain rather than subdirectory or other way to design scopes.Is any special considerations?
Specifications
- Bit version: 0.0.512
@ZyJoey , I don't think there is a limitation here. You can run bit remote add <local-scope> for each one of your remote scopes. As long as the URL is different, you'll get multiple scopes.
@davidfirst, thanks for your reply, but I think you misunderstand what I mean. I have read self-hosted Bit scope and followed it. I want to know if one server (Here is http://localhost:5000) just supports a single remote scope. I hope the self-hosted server can supports multiple scopes,such as http://localhost:5000/remote-scope, http://localhost:5000/remote-scope2. I find Bit.dev implements different scopes by using different subdomains rather than subdirectories. Why is it designed this way? Thx.
@ZyJoey Actually the bit.dev server does use different subdirectories, but it's a much more complex setup. In general, you can create subdirs on the same server, and just spin up as many bit servers on the same servers as you want. Just make sure to distinguish between them somehow. It might be a different port if you want. the docker example is a basic one that lets you quickly spin up one remote server. you can create another one that is more advanced.
@GiladShoham Thanks a lot! I'll try to use the idea you provided.