Is it possible to enable HTTPS protocol on Ember's CLI server? Our corporate OAuth system only allows redirects over HTTPS, so I'm in a bit of a bind without this.
Ember CLI, Ember's command line interface, provides a standard project structure, a set of development tools, and an addon system. This allows Ember developers to focus on building apps rather than building the support structures that make them run.
Installing Ember is done using NPM. While you're at it we recommend you to also install phantomjs (if you don't have it already). Ember CLI uses phantomjs to run tests from the command line (without the need for a browser to be open).
What it does. ember serve takes all of the app's files and turns them into something that can be rendered in the browser. By default, we can view the app by visiting http://localhost:4200 . It's a good idea to keep the server running as we work so that we know as soon as possible that we've broken something.
If possible, try upgrading ember-cli. I'm not sure what happen, but CTRL+C does stop the server.
Please note that as of ember-cli 0.2.6, Your app can be served over https. You just need to add your server.key and server.crt files in the ssl/ folder.
In your ember-cli file add
{
...,
"ssl": true
}
You can also pass it as a command line argument ember s --ssl=true
You can create self-signed certificates by following these instructions:
https://devcenter.heroku.com/articles/ssl-certificate-self
I'll preface this with @sam's answer: Please don't use this in a production environment.
Now, I'm not sure what your tech stack looks like, but when I was testing my app locally, and needed to proxy my requests through HTTPS, I used NGINX as a reverse proxy to my local server through SSL. (Note my server already happened to be running on NGINX so this was a very simple solution for me). I added this to my nginx.conf file:
server {
listen *:4443; // Arbitrary Port Number
location / {
proxy_pass https://HOST_NAME:443/;
}
}
And I ran my ember-server like this:
ember server --proxy http://HOST_NAME:4443
Edit: I believe I misunderstood the original question – see the answer above for how to do local development over SSL.
Ember CLI's server should never be used to serve an app in production. Ember apps are static files, and Ember CLI exists only to help you build those static files up.
Once you're ready to deploy your Ember CLI app, run ember build
. This compiles your project down to a dist
folder, which contains all the static assets. You can then deploy those using any web server you like.
Read more about deployments here: http://www.ember-cli.com/#deployments.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With