-
Notifications
You must be signed in to change notification settings - Fork 51
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add metadata and scripts for App Engine
- Loading branch information
1 parent
ca473de
commit afa9341
Showing
27 changed files
with
113 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
.PHONY: default css dev deps missing-% watch test build deploy deploy-% deploy-commit | ||
|
||
default: dev | ||
|
||
### | ||
# Variables | ||
### | ||
|
||
APPID=zach-navigator | ||
APPYAML=app.yaml | ||
|
||
CURRENT_DIR=$(shell pwd) | ||
|
||
### | ||
# Dependencies | ||
### | ||
|
||
GOAPP_CMD = $(shell sh -c "which goapp || echo 'missing-goapp'") | ||
|
||
missing-%: | ||
$(error missing $*. please install) | ||
|
||
deps: $(GOAPP_CMD) | ||
|
||
### | ||
# Development | ||
### | ||
|
||
dev: deps $(GOAPP_CMD) | ||
$(GOAPP_CMD) serve | ||
|
||
### | ||
# AppEngine Deploy | ||
### | ||
|
||
deploy: deploy-master | ||
|
||
# Deploy to AppEngine with version = % | ||
deploy-%: $(GOAPP_CMD) build | ||
$(GOAPP_CMD) deploy -version $* -application $(APPID) $(APPYAML) | ||
@echo "deployed to http://$*-dot-$(APPID).appspot.com/" | ||
|
||
# Deploy to AppEngine, with version = current git revision | ||
##deploy-commit: deploy-$(GIT_COMMIT) | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,27 @@ | ||
# landlines | ||
# Land Lines | ||
|
||
## Development | ||
|
||
### Environment setup | ||
|
||
Install the [Go SDK for App Engine](https://cloud.google.com/appengine/downloads#Google_App_Engine_SDK_for_Go) | ||
|
||
### Running for Local testing | ||
|
||
To run the server locally, run the command: | ||
|
||
`make dev` | ||
|
||
This will start a local server on `localhost:8080` | ||
|
||
### Deployment | ||
|
||
To deploy to our master server on App Engine ([zach-navigator.appspot.com](zach-navigator.appspot.com)), run the command: | ||
|
||
`make deploy` | ||
|
||
To deploy a specific version, run the command | ||
|
||
`make deploy-[versionName]` | ||
|
||
For example, running the command `make deploy-jeff2` would create a new server version that could be accessed at jeff2-dot-zach-navigator.appspot.com |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
package app | ||
|
||
import ( | ||
"net/http" | ||
) | ||
|
||
|
||
func init() { | ||
www := http.FileServer(http.Dir("www")) | ||
|
||
http.Handle("/", www) | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
runtime: go | ||
api_version: go1 | ||
|
||
handlers: | ||
- url: .* | ||
script: _go_app | ||
secure: always |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
<!doctype html> | ||
|
||
<html lang="en"> | ||
<head> | ||
<meta charset="utf-8"> | ||
|
||
<title>Land Lines</title> | ||
|
||
</head> | ||
|
||
<body> | ||
<h2>Land Lines</h2> | ||
<ul> | ||
<li><a href="draw/">DRAW</a></li> | ||
<li><a href="drag/">SWIPE</a></li> | ||
</ul> | ||
|
||
|
||
</body> | ||
</html> |