oh my what an mess

This commit is contained in:
Dan Buch 2019-07-11 19:12:14 -04:00
parent ef691c9c75
commit 2af3b431b2
Signed by: meatballhat
GPG Key ID: 9685130D8B763EA7
9 changed files with 60 additions and 17 deletions

View File

@ -4,6 +4,6 @@ workflow "Main" {
}
action "vuefun Build" {
uses = "cedrickring/golang-action/go1.11@1.1.1"
uses = "cedrickring/golang-action/go1.12@1.1.1"
args = "make -C vuefun clean all"
}

2
.gitignore vendored
View File

@ -11,3 +11,5 @@
/oldstuff/intro-to-crafty/lib/crafty.js
/oldstuff/intro-to-crafty/assets/*
/oldstuff/intro-to-crafty/tmp/*
/vuefun/build/

3
go.mod Normal file
View File

@ -0,0 +1,3 @@
module github.com/meatballhat/box-o-sand
go 1.12

View File

@ -1,7 +1,31 @@
package main
import "fmt"
import (
"flag"
"io"
"net/http"
"github.com/urfave/negroni"
)
var (
addrFlag = flag.String("a", ":9745", "addr at which to listen")
staticDir = flag.String("s", "static", "directory in which are the static bits")
)
func main() {
fmt.Println("vim-go")
flag.Parse()
mux := http.NewServeMux()
mux.HandleFunc(`/api/`, func(w http.ResponseWriter, req *http.Request) {
io.WriteString(w, "welp")
})
n := negroni.New()
n.Use(negroni.NewStatic(http.Dir(*staticDir)))
n.Use(negroni.NewLogger())
n.UseHandler(mux)
http.ListenAndServe(*addrFlag, n)
}

Binary file not shown.

View File

@ -1 +1,5 @@
module github.com/meatballhat/box-o-sand/vuefun
go 1.12
require github.com/urfave/negroni v1.0.0

View File

@ -1,6 +1,2 @@
github.com/fsnotify/fsnotify v1.4.7 h1:IXs+QLmnXW2CcXuY+8Mzv/fWEsPGWxqefPtCP5CnV9I=
github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo=
github.com/robfig/soy v0.0.0-20190301161207-6b9d0368d426 h1:JjleeXzkHpcebPftrdF+xkSCglWHAeA8BGMyTBzs0F0=
github.com/robfig/soy v0.0.0-20190301161207-6b9d0368d426/go.mod h1:dtQf30vFRESmRbfRJTwRYCwJiH1iWFrjYE+RRNy+Hzo=
golang.org/x/sys v0.0.0-20190309122539-980fc434d28e h1:eFmUCjqCNXZTydmJBXWeJOHCWGd2My0J+jleBc2ntI0=
golang.org/x/sys v0.0.0-20190309122539-980fc434d28e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
github.com/urfave/negroni v1.0.0 h1:kIimOitoypq34K7TG7DUaJ9kq/N4Ofuwi1sjz0KipXc=
github.com/urfave/negroni v1.0.0/go.mod h1:Meg73S6kFm/4PpbYdq35yYWoCZ9mS/YSx+lKnmiohz4=

22
vuefun/static/index.html Normal file
View File

@ -0,0 +1,22 @@
<!DOCTYPE html>
<html>
<head>
</head>
<body>
<div id="app">
<h1>{{ greeting }}</h1>
<p>{{ message }}</p>
<input v-model="message">
</div>
<script src="https://unpkg.com/vue"></script>
<script>
var app = new Vue({
el: '#app',
data: {
greeting: 'hello from the vue around ' + new Date().toLocaleString(),
message: 'wat'
}
})
</script>
</body>
</html>

View File

@ -1,8 +0,0 @@
<!DOCTYPE html>
<html>
<head>
</head>
<body>
<script src="https://unpkg.com/vue/"></script>
</body>
</html>