How to build my app with an outside www folder

Hi everybody,

Im wondering if I can build my native app with an outside www folder?

I explain my situation. My client want an app that can be serve to the mobile and tablet browser AND build also the app as native. I have put the www folder under my webfolder that is accessible in the web. But i don’t want all the cordova/ionic build stuff to be accessible. So how can I tell my ionic to use an external www directory? Is that possible? Or should I have to copy this www folder when i want to build?

Anyone have an idea?

Thanks for reading.

You shouldn’t have to move your www directory - just set it as the root for your web server; that seems like the easiest thing to do.

In Apache for example, you can create a virtual host and set the DocumentRoot to /path/to/your/app/www. Then the server will load what’s inside the www folder and anything outside of it won’t be accessible.

Thanks for the answer. Actually Im in a Wakanda environnement. So my webfolder contains already an app folder which is my desktop app.

I can’t set this folder as my root folder because my webfolder contains other components.

So im studying to use virtual folder with Wakanda

I will come back to tell you if this work. But my question stay open. Can we define that the www folder is outside of my server-side mobile folder?

Take a look at the Ionic CLI docs here:

It seems someone had the same question as you on SO:, and also another similar question here: How to change the directory path that ionic serve on?.

Great thanks. I think with that I can find a way. I will investigate more on this and give feedback.