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

Use host configuration provided in redwood configuration file (so that VM/container users can set it to "0.0.0.0") #216

Merged
merged 1 commit into from
Mar 11, 2020
Merged

Conversation

suvash
Copy link
Contributor

@suvash suvash commented Mar 11, 2020

Instead of hardcoding/assuming development host to be localhost,
make it configurable so that redwood servers being run inside a
container/VM can still be accessed setting host to "0.0.0.0"

The accompanying PR for create-redwood-app is at : redwoodjs/create-redwood-app#32

@peterp
Copy link
Contributor

peterp commented Mar 11, 2020

Thanks for this, could you add this to the types over here:

export type Config = {
web: {
port: number
apiProxyPath: string
}
api: {
port: number
}
browser: {
open: boolean | string
}
}

It would be great if we didn't have to specify this in redwood.toml and provided defaults of localhost to the webpack/ dev-server

@suvash
Copy link
Contributor Author

suvash commented Mar 11, 2020

sure thing.

Instead of hardcoding/assuming development host to be `localhost`,
make it configurable so that redwood servers being run inside a
container/VM can still be accessed setting host to "0.0.0.0"
@suvash
Copy link
Contributor Author

suvash commented Mar 11, 2020

I've gone for the minimum code changes possible here. (instead of defining intermediate vars etc.) I don't have a way to test it now, but can do it tomorrow. Let me know if you had something else in mind.

@peterp
Copy link
Contributor

peterp commented Mar 11, 2020

This is awesome, thank you @suvash !

@peterp peterp merged commit 01b7cc8 into redwoodjs:master Mar 11, 2020
@suvash suvash deleted the add-possibility-to-configure-host branch March 11, 2020 18:05
@thedavidprice
Copy link
Contributor

@suvash @peterp Quick glance at this —> looks like the doc could use some updating+tlc with info about this change, correct?

https://github.com/redwoodjs/redwood/blob/master/docs/redwood.toml.md

If so, possible to get some help? And/or open a new issue and assign it to me fine as well.

@suvash
Copy link
Contributor Author

suvash commented Mar 11, 2020

@thedavidprice @peterp Updated the docs at #228

mohsen1 pushed a commit to mohsen1/redwood that referenced this pull request Apr 12, 2020
…gure-host

Use host configuration provided in redwood configuration file.
@ryancwalsh
Copy link
Contributor

@suvash Thanks for your PR. If you have a moment, I wonder if you easily see what I'm doing wrong when trying to run RedwoodJS yarn rw dev while using a Vagrant VM: #475 Thanks!

@suvash
Copy link
Contributor Author

suvash commented Apr 26, 2020

I don't have a vagrant/virtualbox setup right now, and I see you have it resolved, so I won't dig into this further. 👍

@ryancwalsh
Copy link
Contributor

@suvash Yep, thanks!

@thedavidprice thedavidprice added this to the unassigned-version milestone May 14, 2021
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

Successfully merging this pull request may close these issues.

4 participants