oh my what an mess
This commit is contained in:
parent
ef691c9c75
commit
2af3b431b2
2
.github/main.workflow
vendored
2
.github/main.workflow
vendored
@ -4,6 +4,6 @@ workflow "Main" {
|
|||||||
}
|
}
|
||||||
|
|
||||||
action "vuefun Build" {
|
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"
|
args = "make -C vuefun clean all"
|
||||||
}
|
}
|
||||||
|
2
.gitignore
vendored
2
.gitignore
vendored
@ -11,3 +11,5 @@
|
|||||||
/oldstuff/intro-to-crafty/lib/crafty.js
|
/oldstuff/intro-to-crafty/lib/crafty.js
|
||||||
/oldstuff/intro-to-crafty/assets/*
|
/oldstuff/intro-to-crafty/assets/*
|
||||||
/oldstuff/intro-to-crafty/tmp/*
|
/oldstuff/intro-to-crafty/tmp/*
|
||||||
|
|
||||||
|
/vuefun/build/
|
||||||
|
@ -1,7 +1,31 @@
|
|||||||
package main
|
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() {
|
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.
@ -1 +1,5 @@
|
|||||||
module github.com/meatballhat/box-o-sand/vuefun
|
module github.com/meatballhat/box-o-sand/vuefun
|
||||||
|
|
||||||
|
go 1.12
|
||||||
|
|
||||||
|
require github.com/urfave/negroni v1.0.0
|
||||||
|
@ -1,6 +1,2 @@
|
|||||||
github.com/fsnotify/fsnotify v1.4.7 h1:IXs+QLmnXW2CcXuY+8Mzv/fWEsPGWxqefPtCP5CnV9I=
|
github.com/urfave/negroni v1.0.0 h1:kIimOitoypq34K7TG7DUaJ9kq/N4Ofuwi1sjz0KipXc=
|
||||||
github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo=
|
github.com/urfave/negroni v1.0.0/go.mod h1:Meg73S6kFm/4PpbYdq35yYWoCZ9mS/YSx+lKnmiohz4=
|
||||||
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=
|
|
||||||
|
22
vuefun/static/index.html
Normal file
22
vuefun/static/index.html
Normal 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>
|
@ -1,8 +0,0 @@
|
|||||||
<!DOCTYPE html>
|
|
||||||
<html>
|
|
||||||
<head>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
<script src="https://unpkg.com/vue/"></script>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
Loading…
x
Reference in New Issue
Block a user