-
Notifications
You must be signed in to change notification settings - Fork 4
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
Add publicEndpoint to override resolved endpoint #37
Conversation
@@ -78,6 +80,7 @@ var target = appResolver.getUrl(); | |||
- `dist` - The directory containing the app files to serve. By default, the `dist` directory is used. | |||
- `port` - The port to listen on. By default, port `3000` is used, which is the port that the LMS expects it on. | |||
- `hostname` - The hostname (or IP) to listen on. By default, the hostname of the operating system is used. You should not need to change this. | |||
- `publicEndpoint` - If provided overrides the protocol (http) hostname and port for endpoint resolution |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Another option would be to make the new parameter protocol
, so then you could use the existing port
and hostname
options and just set protocol
= https
. 🤷
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tried that first, but I ran into trouble when trying to run the server. I also had to change the value of the port
, which messed up this line:
app.listen(self._opts.port, function() {
I only want to override the value which gets written into the appconfig.json
file, i.e. for the loader endpoint. Having a single value to override makes it easier to customize the endpoint from the command line.
For example, in the smart-curriculum project, I'm doing this:
npm run build:config -- --publicEndpoint=https://arkt.ngrok.io
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cool, makes sense!
🎉 This PR is included in version 1.2.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Trying to get everything using https. This PR makes it possible to serve the app resolver using ngrok