I hereby claim:
- I am simt2 on github.
- I am simt (https://keybase.io/simt) on keybase.
- I have a public key ASCxDYTJYyvtoY5dVaK0_xDmeqBwg30JFN0zXLbmaQM4JQo
To claim this, I am signing this object:
# Enable the experimental disks feature via environment variable, requires Vagrant >=2.2.8. | |
ENV["VAGRANT_EXPERIMENTAL"] = "disks" | |
Vagrant.configure(2) do |config| | |
config.vm.disk :disk, name: "storage", size: "4GB" | |
end |
I hereby claim:
To claim this, I am signing this object:
Go is a rising multi-purpose programming language, widely used for mostly server-side applications because of its speed, concurrency and ease of use. It has a built-in and production-ready template engine and http server, which also makes it a excellent choice for web applications. This example shows how to create a small web application with Go, using Gentics Mesh as backend to manage all the data for us.
Make sure you have Go installed or set it up as described here. Now get and start the example from Github:
# Download example and change to directory
go get github.com/gentics/mesh-go-example
cd $GOPATH/src/github.com/gentics/mesh-go-example
// LoadChildren takes a nodes uuid and returns its children. | |
func LoadChildren(uuid string) *[]gjson.Result { | |
r := MeshGetRequest("demo/nodes/" + uuid + "/children?expandAll=true&resolveLinks=short") | |
defer r.Body.Close() | |
bytes, _ := ioutil.ReadAll(r.Body) | |
json := gjson.ParseBytes(bytes).Get("data").Array() | |
return &json | |
} |
{{define "content"}} | |
<div> | |
<h1>{{ .Category.Get "fields.name" }}</h1> | |
<div class="row products"> | |
{{range $product := .Products}} | |
<div class="col-xs-12 col-sm-6 col-md-4"> | |
<div class="panel panel-default"> | |
<div class="panel-body"> | |
<h3> |
{{define "content"}} | |
{{with $product := index .Products 0}} | |
<div> | |
<h1>{{ $product.Get "fields.name" }}</h1> | |
<div class="row"> | |
<div class="col-md-6"> | |
<form name="productForm"> |
{{define "content"}} | |
<div class="jumbotron"> | |
<div class="row"> | |
<div class="col-sm-3 text-right"> | |
<svg version="1.0" xmlns="http://www.w3.org/2000/svg" style="max-width: 150px;" viewBox="0 0 500.000000 579.000000" preserveAspectRatio="xMidYMid meet"> | |
<g transform="translate(0.000000,579.000000) scale(0.100000,-0.100000)" fill="#00a0d2" stroke="none"> | |
<path class="gtx-logo-main" d="M2417 5780 c-21 -6 -52 -17 -70 -26 -24 -13 -2014 -1184 -2183 -1285 -43 -26 -108 -98 -136 -151 l-23 -43 -3 -1362 -2 -1362 21 -56 c44 -119 20 -102 1213 -805 598 -353 1109 -652 1135 -663 65 -30 197 -30 262 0 34 15 1874 1096 2205 1294 43 26 108 98 136 151 l23 43 3 1362 c2 1355 2 1362 -18 1417 -61 163 -257 260 -425 211 -41 -12 -278 -145 -765 -432 -774 -455 -786 -463 -829 -578 -28 -75 -28 -184 0 -260 27 -72 104 -156 176 -191 75 -37 185 -44 263 -17 30 10 240 127 466 261 227 133 414 242 418 242 3 0 5 -383 4 -851 l-3 -851 -888 -524 c-488 -288 -892 -524 -897 -524 -5 0 -409 236 -897 524 l-888 524 0 1067 |
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.5/css/bootstrap.min.css"> | |
<meta charset="UTF-8"> | |
<title>Gentics Mesh Demo</title> | |
<style> | |
.row.products > div { | |
height: 500px | |
} |