Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Save Port number for ember-cli in a config file

Tags:

ember-cli

I'm sure I remember seeing some documentation somewhere that had a way to save the port number ember-cli uses in a config file, but it doesn't seem to say anything in the documentation.

I have to use

ember server --port 9999

but i would love to save that port number in a file.

like image 536
real_ate Avatar asked Jun 02 '14 21:06

real_ate


2 Answers

You can use a .ember-cli config file to change the port. discussion

So in your root folder, have a .ember-cli file with the following:

{
  "port": 9999
}

Edit: the .ember-cli file is now documented on the ember-cli website.

like image 175
David Rice Avatar answered Oct 05 '22 03:10

David Rice


Using a .ember-cli file is the way to go according to the ember-cli docs here.

I'm using nitrous.io - which is fantastic - however it doesn't allow port 4200 - and in any case I wanted the server to be on 3000.

Also, I noticed that the server was starting up and refreshing very slowly - issue seems to be with the live-reload-server - and again the default port.

So, my .ember-cli config file now looks like this...

{
    "port": 3000,
    "live-reload-port": 4000
}

Everything seems ok with nitrous.io and most importantly my server load time is now what you would expect - also, live-reload works great.

like image 28
Graham Lewis Avatar answered Oct 05 '22 04:10

Graham Lewis