-
Notifications
You must be signed in to change notification settings - Fork 83
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
devServer.js config with environment variable #228
Comments
Would you like to file a pull request? =) I don't think we need to specifically mention Cloud9. The environment variables should be enough to allow users to make it work on Cloud9. |
Perhaps another approach is a flag on npm start. |
Environment variables work great on any platform, but the way you set them varies depending on platform. However, we should not care about how it gets set, and only respect the environment variables if they are set. So, for example, you could create const {
host = 'localhost',
port = 3000
} = process.env; Now in your cloud9 console, you can set the environment variable before launching the service:
|
There doesn't seem to be anything to test, so don't know how to write test for this. Also, since this codebase is written in ES5, new code I would think should conform with something like:
|
I am stuck on manual testing: Unable to set HOST in bash shell. |
|
When I try to send Pull Request, I get Authentication Failed. |
@pdavidow Have you set up your GitHub SSH Keys? |
The SSH keys are all set, but it still doesn't help. (Tested manually on Cloud9, and Mac OSX) |
If you delete that and just hit the fork button on this repo, then pull your fork and merge your changes into that, then push your changes to your fork, you should be able to submit a pull request. You should see a yellow button pop up asking if you want to submit a PR. |
See Forking a repo |
The deed has been done, I think. A yellow button (actually, a yellow ring) did pop up, but all it's doing is notifying me of pending CI tests -- it's not asking me to submit a PR. (Anyway, the reason it didn't originally work is because I had cloned without making a fork.) |
Nice.. I'll look over it asap |
How would you write tests for this? |
Set the environment variable. Launch the server. Use something like supertest to make sure the server responds appropriately to requests on the specified host/port. |
In devServer.js, instead of
for Cloud9 this should be:
and Nitrous.io:
This could be configured with an environment variable.
The console.log output of course would also need to be updated, and for Cloud9 should also mention that Open in Preview should not be used.
The text was updated successfully, but these errors were encountered: