Skip to content

About

Serve static files from micro api server

Resources

Stars

3 stars

Watchers

1 watching

Forks

Latest commit

 

History

6 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Serve static files from micro api server

Resources

Stars

3 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages

⌂ 换网址