# Host a mobile app on web

**URL:** <https://forum.ionicframework.com/t/host-a-mobile-app-on-web/202299>\
**Category:** Capacitor\
**Created:** [January 6, 2021, 8:54am UTC](https://forum.ionicframework.com/t/host-a-mobile-app-on-web/202299 "2021-01-06T08:54:16Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![artema](https://avatars.discourse-cdn.com/v4/letter/a/d9b06d/32.png) [@artema](https://forum.ionicframework.com/u/artema)\
**Post date:** [January 6, 2021, 8:54am UTC](https://forum.ionicframework.com/t/host-a-mobile-app-on-web/202299/1 "2021-01-06T08:54:16Z")

</div>

I have an Android application built with Ionic and Capacitor (v2). I’m trying to host the `www` folder on web instead of bundling it inside my APK by setting the `server.url` option in the Capacitor config. It works, except that it doesn’t use any native Android plug-ins. Instead, it falls back to a PWA implementation (`window.Capacitor` contains a `CapacitorWeb` instance). Moreover, my custom Capacitor plug-in for Android is trying to call `window.Capacitor.triggerEvent`, but it’s not defined in the web version of Capacitor.

How can I enable it to use Android plug-ins when running from a URL? Everything works when I use a `npx ionic capacitor run android -l` command (which hosts the web code from a local server), so it should be doable, but I must be missing something. I have several apps built on Cordova that work this way and I don’t want to keep my web code inside an APK or use Appflow with live updates just for that.
