How to change the directory path that ionic serve on?


#1

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
#2

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


#3

Can change the port like so.

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

#4

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.


#5

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


#6

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!