1.0.3 • Published 3 years ago

umi-plugin-localtunnel v1.0.3

Weekly downloads
107
License
-
Repository
github
Last release
3 years ago

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',
  },
});
KeyDefaultDescription
hosthttps://localtunnel.meURL for the upstream proxy server.
subdomainumi-project idendityRequest 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.

1.0.2

3 years ago

1.0.3

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago