httpd plugin in ionic capacitorJS

20 Views Asked by At

We are working ionic capacitors hybrid mobile app.

This project ionic cordova later we convert ionic capacitor project with latest version ionic cordova we used this plugin: https://www.npmjs.com/package/@ionic-native/http

import { Httpd, HttpdOptions } from '@ionic-native/httpd/ngx';

const options: HttpdOptions = {
      www_root: dirpath,                      //storage/emulated/0/Android/data/io.test.testapp/files/website/
      port: 9000,
      localhost_only: true,
    };

this.httpd.startServer(options).subscribe((url) => {})

But now we are working on ionic with capacitorsJs, so we need plugin for internal startServer.

1

There are 1 best solutions below

1
StackoverBlows On

You can use @Capacitor/Http plugin instead.