static

package module
v0.0.0-...-fc745a1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 11, 2019 License: MIT Imports: 7 Imported by: 0

README

go-micro-static

Serve static files from go-micro api server index. The plugin was written to work with single page applications.

Usage

Register the plugin before building Micro

package main

import (
	"github.com/micro/micro/plugin"
	static "github.com/bhoriuchi/go-micro-static"
)

func init() {
	plugin.Register(static.NewPlugin())
}

The static directory can be supplied by the --static_dir option. The default is html

micro --static_dir=dist

When using along side API or WEB services, supply the service names to omit from serving with the plugin

micro --static_service=foo --static_service=bar

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewPlugin

func NewPlugin() plugin.Plugin

NewPlugin returns new plugin

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL