meshdirectory_web

package module
v1.0.4 Latest Latest
Warning

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

Go to latest
Published: Mar 26, 2021 License: Apache-2.0 Imports: 3 Imported by: 0

README

meshdirectory-web

image

A web frontend SPA for the Science Mesh Directory service written in Vue 3.

Development

Project setup
yarn install
Compiles and hot-reloads for development
yarn serve
Compiles and minifies for production
yarn build
Lints and fixes files
yarn lint

Usage

To use this frontend in your GOlang projects, run the following:

go get github.com/sciencemesh/meshdirectory-web

And serve the SPA distribution in your HTTP handler, e.g.:

package mypackage
import (
	"net/http"
	"log"
	"github.com/sciencemesh/meshdirectory-web"
)

func Handler() http.Handler {
	return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
	    return ServeMeshDirectorySPA(w, r)
	}
}

func main() {
    http.Handle("/", Handler())
    log.Fatal(http.ListenAndServe(":8080", nil))
}

Finally try to access the Mesh Directory frontend by opening the following url in your browser:

http://localhost:8080/?token=xyz&providerDomain=cesnet.cz

Credits

  • Custom GeoJSON map data was generated using the GeoJSON Maps service.
Customize configuration

See Configuration Reference.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ServeMeshDirectorySPA

func ServeMeshDirectorySPA(w http.ResponseWriter, r *http.Request)

Types

This section is empty.

Jump to

Keyboard shortcuts

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