Search docs/
Getting StartedPlugins

Httpd

Embedded httpd for Cordova apps. Light weight HTTP server.

https://github.com/floatinghotpot/cordova-httpd

Stuck on a Cordova issue?

If you're building a serious project, you can't afford to spend hours troubleshooting. Ionic’s experts offer premium advisory services for both community plugins and premier plugins.

Contact Us Today!

Installation

ionic cordova plugin add cordova-plugin-httpdnpm install @ionic-native/httpdnpm install cordova-plugin-httpdnpm install @ionic-native/httpdionic cap sync
Ionic Enterprise comes with fully supported and maintained plugins from the Ionic Team. Learn More or if you're interested in an enterprise version of this plugin Contact Us

Supported Platforms

  • Android
  • iOS
  • macOS

Usage

React

See here.

Angular

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