feat: update web-editor
This commit is contained in:
@@ -11,6 +11,7 @@ import (
|
||||
"os/exec"
|
||||
"path/filepath"
|
||||
|
||||
packr "github.com/gobuffalo/packr/v2"
|
||||
"github.com/gorilla/handlers"
|
||||
"github.com/gorilla/mux"
|
||||
)
|
||||
@@ -101,7 +102,9 @@ func returnError(w http.ResponseWriter, err error) {
|
||||
func main() {
|
||||
r := mux.NewRouter()
|
||||
|
||||
r.Handle("/", http.FileServer(http.Dir("static")))
|
||||
box := packr.New("static", "./static")
|
||||
|
||||
r.Handle("/", http.FileServer(box))
|
||||
r.HandleFunc("/generate", generate)
|
||||
addr := fmt.Sprintf(":%s", os.Getenv("PORT"))
|
||||
if addr == ":" {
|
||||
|
@@ -90,7 +90,7 @@
|
||||
|
||||
<link rel="stylesheet" href="//netdna.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css">
|
||||
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/8.3/styles/github.min.css">
|
||||
<style>.ace_editor { height: 80%; }</style>
|
||||
<style>.ace_editor { height: 80%; min-height: 500px; }</style>
|
||||
</head>
|
||||
<body ng-app="pggt">
|
||||
<div class="container-fluid" ng-controller="PggtCtrl">
|
||||
|
Reference in New Issue
Block a user