lwa

package module
v0.0.0-...-7e32127 Latest Latest
Warning

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

Go to latest
Published: May 30, 2014 License: BSD-3-Clause Imports: 14 Imported by: 0

README

lwa facilitates running Go web applications locally; it can fill the role of
traditional desktop GUI applications.

Documentation: https://godoc.org/github.com/extemporalgenome/lwa

lwa is under review, and may change. When lwa stabilizes, it will be available
under github.com/xtgo

Documentation

Overview

Package lwa facilitates running local web applications.

Chrome is currently the only browser supported; on each app invocation, a temporary browser profile will be created, and Chrome will be launched in incognito, "app" mode.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Serve

func Serve(handler http.Handler) error

Serve starts a browser instance and http server connected pair via a random port. If handler is nil, http.DefaultServerMux will be used. Serve is analogous to http.ListenAndServe, except that it will return with a nil error after the app browser window is closed.

Serve implicitly authenticates the running OS user using random pre-shared tokens; these are loaded into the browser through a file readable only to the running OS user. Since content is served through localhost, non-root users are unable to observe traffic; further, keep-alives are disabled. After the browser is closed, Serve will block until all open, non-hijacked connections are closed before returning.

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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