gopherjs

command
v0.0.0-...-ba49760 Latest Latest
Warning

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

Go to latest
Published: Aug 31, 2017 License: Apache-2.0 Imports: 8 Imported by: 0

README

Gopherjs Example

This example shows how to build an API that allows uploading and downloading assets. It also provides a small website to show how to use the client with gopherjs

The file generate.go contains go generate directives that uses goagen to generate the necessary files. Run it with:

go generate

Then you need to generate the javascript code.

gopherjs build github.com/bketelsen/microclass/module1/goa/gopherjs/public -o public/website.js

Then compile and run the service:

go build
./gopherjs

Images can be uploaded by sending a multipart mime POST request to /api/images. The part containing the file content must be named "file". This API returns the image metadata in the response including an image ID that can be used to show the image medata and download it.

the website can be accessed by http://localhost:8080/index.html

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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