openwhisk-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michele Sciabarra <>
Subject An example of embedding a vue.js front-end in a Golang action
Date Wed, 17 Oct 2018 17:47:22 GMT
Hello all, here is an example of a Vue.js application served by the Golang runtime.
I think it is a good example of what you can do in Golang on OpenWhisk.

This is just a simple Vue.js application. The interesting part is that the javascript/html/css
and some images are embedded in the runtime using packr (a tool that embeds resources in go
applications) and then served by the action itself.  In this case the action only serves the
static resources, but in general it can also serve dynamic JSON requests. 

We have been discussing how to do that with Carlos, and I created an example for the book
on OpenWhisk I am writing. The source code for the example is here:

There is the Makefile for building the action.
The example  shows:
-  resolution of dependencies with dep 
- embedding of resources with packr
- compiling the action with docker
- serving resources in an OpenWhisk action

You will need to install dep and packr, in addition to and go and docker.
Since the image is not yet published it still uses my snapshot, msciab/actioloop-golang-v1.11

  Michele Sciabarra

View raw message