Skip to content

Commit

Permalink
Merge pull request #8 from gcpug/feature/id/7
Browse files Browse the repository at this point in the history
dir構成を変更
  • Loading branch information
sinmetal committed Nov 9, 2019
2 parents 9c22e7a + 7596217 commit 366e24b
Show file tree
Hide file tree
Showing 15 changed files with 33 additions and 473 deletions.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion go-app/ds_test.go → backend/ds_test.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package main
package backend

import "testing"

Expand Down
2 changes: 1 addition & 1 deletion go-app/http.go → backend/http.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package main
package backend

import "fmt"

Expand Down
2 changes: 1 addition & 1 deletion go-app/model_query.go → backend/model_query.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// generated by qbg -usedatastorewrapper -output model_query.go .; DO NOT EDIT

package main
package backend

import (
"go.mercari.io/datastore"
Expand Down
5 changes: 4 additions & 1 deletion go-app/static.go → backend/static.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package main
package backend

import (
"errors"
Expand Down Expand Up @@ -64,6 +64,7 @@ func StaticContentsHandler(w http.ResponseWriter, r *http.Request) {
}

w.Header().Set("Content-Type", ct)
w.Header().Set("Cache-Control", "max-age=900")
w.Header().Set("Content-Length", fmt.Sprintf("%d", len(f)))
w.WriteHeader(http.StatusOK)
w.Write(f)
Expand Down Expand Up @@ -92,10 +93,12 @@ func writeIndexHTML(w http.ResponseWriter) {
fn := "index.html"
f, err := readFile(fn)
if err != nil {
fmt.Printf("failed read index.html file. err=%v\n", err)
http.Error(w, err.Error(), http.StatusInternalServerError)
return
}
w.Header().Set("Content-Type", "text/html;charset=utf-8")
w.Header().Set("Cache-Control", "max-age=900")
w.Header().Set("Content-Length", fmt.Sprintf("%d", len(f)))
w.WriteHeader(http.StatusOK)
w.Write(f)
Expand Down
90 changes: 0 additions & 90 deletions go-app/.gitignore

This file was deleted.

76 changes: 0 additions & 76 deletions go-app/main.go

This file was deleted.

51 changes: 0 additions & 51 deletions go-app/organization_api.go

This file was deleted.

27 changes: 0 additions & 27 deletions go-app/organization_api_test.go

This file was deleted.

Loading

0 comments on commit 366e24b

Please sign in to comment.