GolapaOnGAE

turret-io edited this page Sep 1, 2014 · 3 revisions

Instructions

  1. Setup a new AppEngine project.

  2. Change to the golapa/golapa/golapa directory.

  3. Edit app.yaml and change <PROJECT-ID-HERE> to your AppEngine Project ID.

  4. Edit appengine.go and replace <APPENGINE-EMAIL-SENDER> with the email address of the owner of your AppEngine project. Then, replace <RECIPIENT> with the email address that should receive new signup details.

  5. Download and extract the Go AppEngine SDK from https://developers.google.com/appengine/downloads.

  6. Optionally, download and install Sass if you'd like to make CSS changes

  7. To test the app locally, run /path/to/appengine/sdk/goapp serve . from the golapa/golapa/golapa directory

  8. Browse to http://localhost:8080

  9. Tweak the templates in /path/to/golapa/templates/ as desired, update CSS in /path/to/golapa/static/css/sass/launch.scss (rebuild via the Sass instructions above), and add any images to /path/to/golapa/static/images/

  10. Deploy to AppEngine. Enter the base directory of this project and run /path/to/appengine/sdk/goapp deploy .

Turret.IO Support

Golapa now supports Turret.IO as an alternative to sending an email when a user signs up.

By default, users that sign up will have an attribute signedup set to 1 making it easy to create a target for those users

  • Get the Turret.IO Go client
> goapp get github.com/turretIO/turret-io-go
  • Add the Turret.IO Go client library to the list of imports in appengine.go
import (
	"appengine"
	"appengine/mail"
	"appengine/taskqueue"
	_ "fmt"
	"github.com/turretIO/turret-io-go"
	"log"
	"net/http"
	"net/url"
	"text/template"
)
const api_key = "<YOUR TURRET.IO API KEY>"
const api_secret = "<YOUR TURRET.IO API SECRET>"
  • Uncomment the ServeHTTP method of AppEngineTurret in appengine.go

  • Edit appengine.go and change http.HandleFunc("/worker", newAppEngineEmailHandler) to http.HandleFunc("/worker", newAppEngineTurret)

Re-deploy your app and check for errors. Be sure to test that users are successfully being added to whatever targets you create with Turret.IO

Clone this wiki locally
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.