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

@redwoodjs/web-server #8916

Merged
merged 27 commits into from
Jul 21, 2023
Merged

@redwoodjs/web-server #8916

merged 27 commits into from
Jul 21, 2023

Conversation

Tobbe
Copy link
Member

@Tobbe Tobbe commented Jul 14, 2023

Add a new server for the Web side that docker files can use to serve the web side of a RW project without depending on other big RW packages like cli or internal.

The goal is that this should be a non-breaking change. If it's not, I need to fix that.

Currently, as this PR stands, the new web-server package will only be used when you run yarn rw dev web and the SSR experimental features is not enabled. If you run yarn rw dev the old way of serving web is still used (couldn't switch to the new web-server package without breaking backwards compatibility)

The new web-server package is added as a dependency to @redwoodjs/core so that RW projects get access to it (for running yarn rw dev web. The options here were to either make it a dependency of core or cli. But it's core that has it listed as a bin, so I opted to put it in the deps for core. (api-server is also a bin in core, but it's listed as a dep in cli. And it works, because cli is a dep of core, but I don't think it's totally correct.)

@Tobbe Tobbe added the release:chore This PR is a chore (means nothing for users) label Jul 14, 2023
@Tobbe Tobbe added this to the v6.0.0 milestone Jul 14, 2023
@Tobbe Tobbe marked this pull request as ready for review July 20, 2023 16:49
@Tobbe Tobbe changed the title @redwoodjs/fe-server @redwoodjs/web-server Jul 20, 2023
Copy link
Collaborator

@Josh-Walker-GM Josh-Walker-GM left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested locally and the web side works as expected. I did not test every possible combination of experimental features.

@Josh-Walker-GM Josh-Walker-GM merged commit 7d1a3f5 into redwoodjs:main Jul 21, 2023
29 checks passed
@jtoar jtoar modified the milestones: v6.0.0, next-release Jul 21, 2023
@jtoar
Copy link
Contributor

jtoar commented Jul 21, 2023

Heads up that I'm not going to cherry pick this just yet to v6 so I changed the milestone, though this totally could land in the v6 RC or a minor, etc.

@Tobbe
Copy link
Member Author

Tobbe commented Jul 21, 2023

I'm not going to cherry pick this just yet to v6

@jtoar Good call!

@jtoar jtoar modified the milestones: next-release, v6.1.0 Aug 12, 2023
@razzeee
Copy link
Contributor

razzeee commented Aug 17, 2023

Hey, I'm a bit confused by this, as you only mention dev, wouldn't you want to run a non dev server in most cases - when we talk about docker?

@Josh-Walker-GM
Copy link
Collaborator

@razzeee yeah you're right. This will be for serve too.

This was inspired by our work on better docker support - a priority for us. We are now looking to get parity between the way we serve web and api sides. We already had an api-server package but we lacked a similar package for web. This complicated things all over the place with many different entry points and ambiguous dependencies. We've got even more refactoring work going on behind the scenes to tidy up this area of the code so hopefully this will all come together coherently in a month or so.

@razzeee
Copy link
Contributor

razzeee commented Aug 17, 2023

Yeah, I'm aware of the work going on, was just wondering, if I could already migrate parts of my docker file/flow.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release:chore This PR is a chore (means nothing for users)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants