How to change the directory path that ionic serve on?


The hard coded path that ionic serve starts is ./www, that is the www directory under the current working directory. In order to fit my company’s infrastructure, I would like to use a different folder name and start the serve under this new name. Is that possible? If so, how would I do that? Thanks.

How to build my app with an outside www folder

I would like to do that too ! Somebody have an idea ?


Can change the port like so.

 ionic serve [http-port] [livereload-port] [options]


The ionic cli uses the key documentRoot to read from ionic.project. So just add

"documentRoot": "located/somewhere/else",

to point it to another path.


I am having the same issue but changing documentRoot shows blank page


I was using gulp-ionic yeoman generator for my ionic project. Only thing missing was live reload on device. I changed documentRoot to .tmp and it worked like charm. Thanks for this!