README.md (1906B)
1 novelty.go 2 == 3 4 Single word (yes/no) site for app engine in go. Demo: https://isryanattheoffice.com. 5 6 Uses basic auth for updating answer, to make it easy to wire up to IFTTT, 7 Tasker, etc. 8 9 Uses fancy new (circa 7 years ago) responsive design, to scale based on screen size. 10 11 Setup 12 === 13 14 1. Get your 15 [dev environment](https://developers.google.com/appengine/docs/go/gettingstarted/devenvironment) 16 set up for GAE. 17 2. Clone this repository, cd into the directory. 18 3. ```cp app.yaml.example app.yaml``` 19 4. Replace EXAMPLE_PASSWORD with your desired password. 20 21 Running locally 22 === 23 24 1. Start the dev server: ```$ dev_appserver.py .``` 25 2. Visit http://localhost:8080/ 26 27 Your novelty server is ready to go. The answer is currently set to "no". 28 29 To change the answer to "yes", simply visit 30 http://larry:EXAMPLE_PASSWORD@localhost:8080/yes 31 32 Running on appspot 33 === 34 35 1. Follow the 36 [registration instuctions](https://developers.google.com/appengine/docs/go/gettingstarted/uploading) 37 for GAE. 38 2. Push the app: ```$ gcloud app deploy``` 39 3. Visit http://$APPID.appspot.com/ to behold your new novelty server. 40 41 Deploying automatically with Cloud Build (optional) 42 === 43 44 I use Cloud Build to deploy this app to https://isryanattheoffice.com/ on push 45 to this github repo. I do a little fiddling with sed and substitution variables 46 in order to keep the password out of this repo. 47 48 1. Follow the 49 [getting started](https://cloud.google.com/source-repositories/docs/quickstart-triggering-builds-with-source-repositories#grant_gae_name_access_to_the_builder_name_service_account) 50 guide for Cloud Build. 51 2. Create a build trigger, specifying wherever you keep your copy of this repo. 52 3. Choose "Cloud build configuration" and leave the path the default. 53 4. In "Substitution variables" add _PASSWORD with whatever value you want. 54 55 License 56 === 57 58 novelty.go is released under the MIT license. See LICENSE for more details.