Httpd

Contents

Embedded httpd for Cordova apps. Light weight HTTP server.

Installation

ionic cordova plugin add cordova-plugin-httpdnpm install @ionic-native/httpd
Ionic EE comes with fully supported and maintained plugins from the Ionic Team. Learn More or Contact Us
ionic enterprise register --key=YOURPRODUCTKEYnpm install @ionic-enterprise/httpd

Supported Platforms

  • Android
  • iOS
  • macOS

Usage

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');
});