Skip to content
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

[RFC] Multiple Web Projects share one API #480

Closed
BurnedChris opened this issue Apr 28, 2020 · 1 comment
Closed

[RFC] Multiple Web Projects share one API #480

BurnedChris opened this issue Apr 28, 2020 · 1 comment

Comments

@BurnedChris
Copy link
Contributor

BurnedChris commented Apr 28, 2020

Many companies have the use case of two clients that would share one API.
such as marketplaces that could have a buyer client and a seller client that would share one API and not necessary want to be in the same package

Would redwood be a good fit for these kind of companies without having to build their own mono-repo.
To what i understand this is not currently supported from what i can see in the docs.

these are the problems i for-see with he implementation

Problem 1 - redwood.toml

redwood toml would need tweaking to defined that there are multiple clients that use the api, example below;

[web]
  name="Client 1"
  port = 8910
  apiProxyPath = "/.netlify/functions"
[web]
  name="Client 2"
  port = 8912
  apiProxyPath = "/.netlify/functions"
[api]
  port = 8911
[browser]
  open = true

Problem 2 - netlify.toml

each client would potentially need their own netlify.toml.
One solution would be to allow the Netlify toml file to be able to be ran from one of the clients.

Problem 3 - Should redwood support multiple web clients?

This is more a question of responsibility of redwood without even thinking of tech.
I think that because redwood also helps make and control the API.
It would be make sense if redwood could have multiple clients that could connect to the same API.

Would like to hear what other people think of this?

@thedavidprice
Copy link
Contributor

Hi @burnsy Great idea! We’re big believers in having one API to “rule them all”. And it turns out this is built into the concept of Redwood’s Sides. 🚀 But you're correct, it’s not currently supported as envisioned, however, it in in progress and you can follow the work here:
#355

Given that this has already been decided, I’m going to close out this issue in favor of moving discussion/questions to the PR. When/if needed, we can open this up again.

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

2 participants