HTTPS Support for Development Environment#238
Conversation
BKreisel
commented
Jan 19, 2018
- HTTPS Self-Signed Certificate Auto-Generation.
- Some ES6-ification
- Move Constant Strings out to Separate Module
| // we need to default to the hosted dev DB is there is a username and password vars configured | ||
| var devDBConnection; | ||
| if (typeof (process.env.MOSAICGROUPS_USERNAME) != 'undefined' && typeof (process.env.MOSAICGROUPS_PASSWORD) != 'undefined') { | ||
| devDBConnection = 'mongodb://' + process.env.MOSAICGROUPS_USERNAME + ':' + process.env.MOSAICGROUPS_PASSWORD + '@ds061288.mlab.com:61288/mosaicgroups-dev'; |
There was a problem hiding this comment.
Correct me if I'm wrong, but we never used this dev instance.
| logger.log('Configuring scheduler'); | ||
| require('./server/config/scheduler')(); | ||
|
|
||
| logger.log('environment: ' + config.env); |
There was a problem hiding this comment.
Wy remove a print out of what environment is running? I feel like that could be helpful in some cases.
There was a problem hiding this comment.
Nevermind. I see that it's moved now.
|
|
||
| logger.log('Listening on port ' + config.http.port); | ||
| if (config.env === constants.DEV) { | ||
| logger.log(`Starting HTTPS listener on port: ${config.https.port}`); |
There was a problem hiding this comment.
Do we need this duplicated log?
There was a problem hiding this comment.
I think it's useful because it lets you know what port the HTTP vs the HTTPS listener are configured on.
|
How do I run the local version now? I'm getting "no such file" error for |
|
Give it a go now. I tested it a couple more times and found out that there was a chance that startup process would check for the key before it was finished being generated. I didn't realize You should still be able to go with |
|
Are you getting this on any page? I'm unable to replicate the issue in either Chrome or in Firefox. Are you using https://localhost:3031 ? |
|
Ah I was using http://localhost:3030. Everything is working now. Why is the 3030 port still being used? |
|
🤷♂️ . We really don't need it anymore. Might as well remove it |
