https://github.com/shihanng/appengine-go
https://github.com/shihanng/appengine-go
appengine go golang google
Last synced: about 1 year ago
JSON representation
- Host: GitHub
- URL: https://github.com/shihanng/appengine-go
- Owner: shihanng
- License: mit
- Created: 2017-07-09T13:37:24.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2017-07-12T00:06:47.000Z (almost 9 years ago)
- Last Synced: 2025-02-05T23:54:13.128Z (over 1 year ago)
- Topics: appengine, go, golang, google
- Language: Go
- Size: 10.7 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[](https://circleci.com/gh/shihanng/appengine-go/tree/master)
# appengine-go
## Project Structure
- `GOPATH` starts from `.`.
- The "main"/"driver" of the app is in `aeloader`.
- The other packages of the app live in `applib`.
- External packages are vendored with [`dep`](https://github.com/golang/dep).
```
src
└── app
├── aeloader
├── applib
│ ├── guestbook
│ └── sign
└── vendor
```
## Deployment
```bash
appcfg.py -A [YOUR_PROJECT_ID] -V [YOUR_VERSION_ID] update src/app/aeloader
```
## Local Development
```bash
dev_appserver.py src/app/aeloader
```
## Development Environment
We can use [direnv](https://direnv.net/) to help us setup
an environment that kind of "replace" `go` with `goapp`
from the [App Engine SDK for Go](https://cloud.google.com/appengine/docs/standard/go/download#appengine_sdk).
In our `.envrc` we can have something like the following:
```bash
export PATH=`pwd`/bin:$HOME/bin/fakego:$HOME/bin/go_appengine:$PATH
export GOROOT=$HOME/bin/go_appengine/goroot-1.8
export GOPATH=`pwd`
```
In `$HOME/bin/fakego` we have a shell script name `go`:
```sh
#!/bin/sh
# Remove gohack from path and run goapp.
PATH=${PATH#$HOME/bin/go_appengine} goapp $@
```
just to tell our editor that we are using `goapp` version of `go`.