Hello all,
I have a question that might turn out to be a misunderstanding about how a 
typical development process works but it's probably a chance to learn 
anyway so...

I started plugging away at various Google Code labs to bring myself up to 
speed with golang, in particular 
https://codelabs.developers.google.com/codelabs/nyc-subway-station-locator/index.html
 
which uses a basic import net/http, init() to register a handler(), write 
hello world type pattern found at 
https://codelabs.developers.google.com/codelabs/nyc-subway-station-locator/index.html#2
 
along with a suitable app.yaml to facilitate the end of goal of running you 
app with "goapp serve". They extend it from there and eventually "gcloud 
app deploy" it.

Very nice. I changed it to do the London underground and played around with 
the JS a bit, blah blah.

I then decided to containerize this and deploy it to GKE via docker so that 
I could fix a static IP to it and call remote APIs that need to white-list 
you (hence the static IP). I wrote a docker file, 
https://github.com/philipmather/scry.philipmather.dev/blob/master/Dockerfile.scry
 
and got that going via "docker build -f Dockerfile.scry -t scry ." and then 
say "docker run --rm -p 8080:8080 scry" etc, etc...

In moving from GAE to GKE obviously I lose whatever "scaffolding" 
("google.golang.org/appengine" ?) it is that GAE provides and replaced 
init() with a main() that constructs a ditty little web server. This all 
works great and the build time isn't a total killer but I miss being able 
to tweak the files with "goapp serve" running and see the result "live" as 
it were, especially as a large chunk of the app is Javascript working 
against the Maps API.

So... Is it possible to construct something that can do both? Instead of 
porting the contents of init() to a main() should I have simply kept 
something like https://godoc.org/google.golang.org/appengine#Main, imported 
"google.golang.org/appengine" and continued my app in it's own package 
(instead of main?)?

I'm aware I can use cloud builder and triggers to add more automagic to my 
process but nothing seems to have the immediacy of "goapp serve"? I feel 
like I've missed something somewhere? Searched high and low and can't find 
anyone doing what I'm aiming for? Any pointers appreciated!

Regards,
   Phil

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/google-appengine.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-appengine/0643a842-ca60-4281-854b-d70e963ab28f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
  • [google-appe... Philip Mather
    • [google... 'Harmit Rishi (Cloud Platform Support)' via Google App Engine

Reply via email to