In order for vercel dev to proxy to rw, it needs to pass a port.
Ideally this could be a --port flag or it could also use a PORT environment variable.
The flag would need to have precedence over the port defined in redwood.toml, otherwise it will never work since create-redwood-app generates a redwood.toml.
Hey @styfle, cool to see that you're using Vercel! We're trying to make Redwood seamless with more deploy targets, Vercel included.
Does vercel dev use rw dev under the hood? Basically, vercel dev can't read from the toml at all is what you're saying right?
Does
vercel devuserw devunder the hood
Yes
Basically, vercel dev can't read from the toml at all is what you're saying right?
The problem is that vercel dev creates an ephemeral port, for example 50123, and passes that to the framework's cli yarn rw dev --port 50123. Then it waits until it detects the port is in use before prompting the user that they can start developing.
Here's a quick fix: #891
This is easier than implementing a new --port flag and will solve the problem for vercel dev.
Thanks @styfle! @peterp @thedavidprice How do you feel about the fix in #891? I think we had some plans for Vercel integration and wasn't sure of the details.
@styfle @jtoar
Dom, it's a pleasure to introduce you to Steven, who works at Vercel and has been helping with the heavy lifting for Redwood deployment support! (And apologies I didn't make this introduction earlier, but greatly appreciate you both helping on this.)
I've followed up on the PR. I think I'm leaning to add the Yargs option and could try to help this weekend, but I'm deferring to Peter.
@styfle my bad! 馃槄 Nice to meet you and thank you for answering my questions!
Most helpful comment
@styfle my bad! 馃槄 Nice to meet you and thank you for answering my questions!