diff --git a/src/@ionic-native/plugins/httpd/index.ts b/src/@ionic-native/plugins/httpd/index.ts deleted file mode 100644 index 410aceb8e..000000000 --- a/src/@ionic-native/plugins/httpd/index.ts +++ /dev/null @@ -1,89 +0,0 @@ -import { Injectable } from '@angular/core'; -import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core'; -import { Observable } from 'rxjs'; - -export interface HttpdOptions { - /** - * The public root directory for your web server. This path is relative to your app's www directory. - * Default is current directory. - */ - www_root?: string; - /** - * The port number to use. - * Default is 8888 - */ - port?: number; - /** - * Setting this option to false will allow remote access to your web server (over any IP). - * Default is false. - */ - localhost_only?: boolean; -} - -/** - * @name Httpd - * @description - * Embedded httpd for Cordova apps. Light weight HTTP server. - * @usage - * ```typescript - * import { Httpd, HttpdOptions } from '@ionic-native/httpd/ngx'; - * - * constructor(private httpd: Httpd) { } - * - * ... - * - * - * let options: HttpdOptions = { - * www_root: 'httpd_root', // relative path to app's www directory - * port: 80, - * localhost_only: false - * } - * - * this.httpd.startServer(options).subscribe((data) => { - * console.log('Server is live'); - * }); - * - * ``` - * @interfaces - * HttpdOptions - */ -@Plugin({ - pluginName: 'Httpd', - plugin: 'cordova-plugin-httpd', - pluginRef: 'cordova.plugins.CorHttpd', - repo: 'https://github.com/floatinghotpot/cordova-httpd', - platforms: ['Android', 'iOS', 'macOS'], -}) -@Injectable() -export class Httpd extends IonicNativePlugin { - /** - * Starts a web server. - * @param options {HttpdOptions} - * @returns {Observable} Returns an Observable. Subscribe to receive the URL for your web server (if succeeded). Unsubscribe to stop the server. - */ - @Cordova({ - observable: true, - clearFunction: 'stopServer', - }) - startServer(options?: HttpdOptions): Observable { - return; - } - - /** - * Gets the URL of the running server - * @returns {Promise} Returns a promise that resolves with the URL of the web server. - */ - @Cordova() - getUrl(): Promise { - return; - } - - /** - * Get the local path of the running webserver - * @returns {Promise} Returns a promise that resolves with the local path of the web server. - */ - @Cordova() - getLocalPath(): Promise { - return; - } -}