pull/10/head
Hunter Long 2018-06-09 18:36:21 -07:00
parent 26b8ab85a5
commit a5c43f6957
5 changed files with 15 additions and 15 deletions

3
.gitignore vendored
View File

@ -1,2 +1,3 @@
.idea
rice-box.go
rice-box.go
config.yml

View File

@ -29,12 +29,12 @@ deploy:
- provider: releases
api_key: $GH_TOKEN
file:
- "build/fusioner-osx-x64"
- "build/fusioner-osx-x32"
- "build/fusioner-linux-x64"
- "build/fusioner-linux-x32"
- "build/fusioner-windows-x64.exe"
- "build/fusioner-windows-x32.exe"
- "build/statup-osx-x64"
- "build/statup-osx-x32"
- "build/statup-linux-x64"
- "build/statup-linux-x32"
- "build/statup-windows-x64.exe"
- "build/statup-windows-x32.exe"
skip_cleanup: true
services:
@ -53,8 +53,7 @@ before_script:
- go get github.com/karalabe/xgo
- go get github.com/GeertJohan/go.rice
- go get github.com/GeertJohan/go.rice/rice
- go get -u golang.org/x/vgo
- vgo get -u
- go get
script:
- if [[ "$TRAVIS_BRANCH" == "master" ]]; then /bin/bash -c ./build.sh; fi

View File

@ -2,8 +2,8 @@ FROM golang:alpine as builder
RUN apk update && apk add git
COPY . $GOPATH/src/github.com/hunterlong/fusioner/
WORKDIR $GOPATH/src/github.com/hunterlong/fusioner/
COPY . $GOPATH/src/github.com/hunterlong/statup/
WORKDIR $GOPATH/src/github.com/hunterlong/statup/
RUN go get github.com/GeertJohan/go.rice/rice
RUN go get -d -v
RUN rice embed-go
@ -11,4 +11,4 @@ RUN go install
EXPOSE 8080
ENTRYPOINT fusioner
ENTRYPOINT statup

View File

@ -2,7 +2,7 @@
mkdir build
APP="fusioner"
APP="statup"
rice embed-go

4
web.go
View File

@ -13,7 +13,7 @@ type dashboard struct {
}
func RunHTTPServer() {
fmt.Println("Fusioner HTTP Server running on http://localhost:9595")
fmt.Println("Fusioner HTTP Server running on http://localhost:8080")
css := http.StripPrefix("/css/", http.FileServer(cssBox.HTTPBox()))
js := http.StripPrefix("/js/", http.FileServer(jsBox.HTTPBox()))
http.Handle("/", http.HandlerFunc(IndexHandler))
@ -29,7 +29,7 @@ func RunHTTPServer() {
http.Handle("/token/create", http.HandlerFunc(CreateServiceHandler))
http.Handle("/tokens", http.HandlerFunc(ServicesHandler))
http.Handle("/users", http.HandlerFunc(UsersHandler))
http.ListenAndServe(":9595", nil)
http.ListenAndServe(":8080", nil)
}
func LogoutHandler(w http.ResponseWriter, r *http.Request) {