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

Using gulp to set the value of Rt106_SERVER_URL from environment vari… #7

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

sarachan
Copy link

…able Rt106_SERVER_HOST. This eliminates the need to rebuild the Docker image to run on a different machine and not have the browser on localhost.

…able Rt106_SERVER_HOST. This eliminates the need to rebuild the Docker image to run on a different machine and not have the browser on localhost.
Copy link
Contributor

@millerjv millerjv left a comment

Choose a reason for hiding this comment

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

I do not understand the changes to the two config.js files. It looks like all that changed is removing whitespace and deleting the Copyright notice.

Env Var should just be Rt106_SERVER_URL not Rt106_SERVER_HOST.

I usually see gulp being run as part of npm (action to a target in package.json), not as part of one's node.js code.

@sarachan
Copy link
Author

When gulp-ng-constant modifies config.js, it tries to interpret the copyright notice in some way, resulting in garbled stuff in the file. It was best to remove the copyright notice, because it seems to confuse the processing of gulp-ng-constant.

I used Rt106_SERVER_HOST as the environment variable to specify the hostname only. Internally to the code the full URL is set to the variable Rt106_SERVER_URL. These are slightly different.

Gulp is a node.js extension and does run as node.js code. It could be a standalone utility that does nothing other than the gulp functions or as part of an application. Let me know if you have a specific alternative organization in mind.

@millerjv
Copy link
Contributor

millerjv commented Feb 13, 2018 via email

@sarachan
Copy link
Author

sarachan commented Feb 14, 2018

I had briefly compared gulp and grunt by reading a few online comparisons. There seemed to be a slight community preference for gulp, which is newer, but I did not investigate the comparison exhaustively.

We may not need the static config.js files because they are generated. In fact, I had it set up that way for a while. I added them for the case of mounting the rt106-app directory for local development, but perhaps that would work anyway... I did not test that without the static config.js.

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.

2 participants