Skip to content

Commit

Permalink
Add metadata and scripts for App Engine
Browse files Browse the repository at this point in the history
  • Loading branch information
customlogic committed Oct 26, 2016
1 parent ca473de commit afa9341
Show file tree
Hide file tree
Showing 27 changed files with 113 additions and 1 deletion.
46 changes: 46 additions & 0 deletions Makefile
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)


28 changes: 27 additions & 1 deletion README.md
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
13 changes: 13 additions & 0 deletions app.go
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)
}

7 changes: 7 additions & 0 deletions app.yaml
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.
20 changes: 20 additions & 0 deletions www/index.html
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>

0 comments on commit afa9341

Please sign in to comment.