umi-plugin-localtunnel

1.0.3 • Public • Published

umi-plugin-localtunnel

A plugin for exposing local umi 3 web application to the world for sharing and testing.

Usage

Install

  1. Install plugin
$ npm install umi-plugin-localtunnel
  1. umi would automatically detect the plugin and register it(No need to explicitly declare inside plugin, or duplicated register error would be throwed)

Configuration

Use key (localtunnel) to configure the plugin inside .umirc.js file:

import { defineConfig } from 'umi';

export default defineConfig({
  localtunnel: {
    host: 'https://localtunnel.me',
    subdomain: 'my-umi-application',
  },
});
Key Default Description
host https://localtunnel.me URL for the upstream proxy server.
subdomain umi-[project idendity] Request a specific subdomain on the proxy server.

NOTE: Umi-plugin-localtunnel use localtunnel module inside. For more information, refer to its official document.

Disable plugin

To disable plugin, just remove localtunnel configuration in .umirc.js.

Runtime

After first development compile, the localtunnel would be connected. And the following information would be printed to the terminal: Tunnel is running on: https://[subdomain].[host]. Just click the link to use it.

Plugin Development

Install

# or yarn
$ npm install
$ npm run build --watch
$ npm run start

Usage

Configure in .umirc.js,

export default {
  plugins: ['path/to/your/local/umi-plugin-localtunnel'],
  localtunnel: {
    ...
  }
};

For more informatiom, refer to plugin and plugin API of umi document.

Readme

Keywords

Package Sidebar

Install

npm i umi-plugin-localtunnel

Weekly Downloads

5

Version

1.0.3

License

none

Unpacked Size

7.02 kB

Total Files

3

Last publish

Collaborators

  • zlguo1996