Hi David,
Dev app server was previously used to test your application on local environment replicating the App Engine First Generation’s behavior <https://cloud.google.com/appengine/docs/standard/appengine-generation> however as GO 1.11 is now running on the Second Generation there is no need to use Dev app server anymore. The Second Generation of App Engine will run your code exactly how it would run on your local machine. That being said, the command to run your Go 1.11 application on your local environment is “go run <https://cloud.google.com/appengine/docs/standard/go111/testing-and-deploying-your-app>”. Please note that Go 1.11 is in Beta release meaning that this feature could change and is not subject to any SLA. On Thursday, January 17, 2019 at 11:33:07 AM UTC-5, David Manz wrote: > > I didn't have 'api_version' in the app.yaml. I don't think the app.yaml > was being read at all. > > With Go 1.11, what is the correct way to start the app locally? Is it 'go > run .', or is it 'goapp serve'? 'goapp serve' isn't working for me on > Windows, because I have a space in my path: > > > "\Users\David\AppData\Local\Google\Cloud > SDK\google-cloud-sdk\platform\google_appengine\goapp" serve > python: can't open file 'C:\Users\David\AppData\Local\Google\Cloud': > [Errno 2] No such file or directory > > David > > > On Thursday, January 17, 2019 at 9:02:41 AM UTC-6, Omair (Cloud Platform > Support) wrote: >> >> Hi David, >> >> The reason it does not work for runtime go111 is because 'api_version' is >> not a supported element for Go 1.11. For full list of supported elements >> for Go 1.11 click here >> <https://cloud.google.com/appengine/docs/standard/go111/config/appref#runtime_and_app_elements>. >> >> The supported elements for Go 1.9 can be seen here >> <https://cloud.google.com/appengine/docs/standard/go/config/appref#runtime_and_app_elements> >> . >> >> I hope this helps. >> >> On Wednesday, January 16, 2019 at 11:31:50 PM UTC-5, David Manz wrote: >>> >>> If I modify the app.yaml like this: >>> >>> #runtime: go111 >>> runtime: go >>> api_version: go1 >>> >>> >>> then I can run "dev_appserver.py ./app.yaml", and I can see my static >>> content. >>> >>> I don't know why runtime:go111 doesn't work, but I suppose this works >>> for now. >>> >>> Thanks again! >>> >>> David >>> >>> >>> On Wednesday, January 16, 2019 at 9:54:34 PM UTC-6, David Manz wrote: >>>> >>>> Hi George, >>>> >>>> Thanks for the help. >>>> >>>> I did find the documentation on serving static content, but I think >>>> there's something more basic that I'm missing. If I delete app.yaml from >>>> the directory entirely, then I don't see any errors--just the same >>>> behavior. >>>> >>>> My directory looks like this: >>>> >>>> src/myapp/app.yaml >>>> src/myapp/myappscript.go >>>> src/myapp/myapptemplate.html >>>> src/myapp/static/x.png >>>> >>>> and I'm doing 'go run .' in the Google Cloud SDK Shell from inside >>>> src/myapp/ >>>> >>>> >dev_appserver.py ./app.yaml >>>> >>>> INFO 2019-01-15 20:06:17,151 devappserver2.py:120] Skipping SDK >>>> update check. >>>> INFO 2019-01-15 20:06:17,960 api_server.py:274] Starting API server >>>> at: http://localhost:4291 >>>> INFO 2019-01-15 20:06:17,960 stub_util.py:357] Applying all pending >>>> transactions and saving the datastore >>>> INFO 2019-01-15 20:06:17,960 stub_util.py:360] Saving search indexes >>>> Traceback (most recent call last): >>>> File "C:\Users\David\AppData\Local\Google\Cloud >>>> SDK\google-cloud-sdk\platform\google_appengine\dev_appserver.py", line 96, >>>> in <module> >>>> _run_file(__file__, globals()) >>>> File "C:\Users\David\AppData\Local\Google\Cloud >>>> SDK\google-cloud-sdk\platform\google_appengine\dev_appserver.py", line 90, >>>> in _run_file >>>> execfile(_PATHS.script_file(script_name), globals_) >>>> File "C:\Users\David\AppData\Local\Google\Cloud >>>> SDK\google-cloud-sdk\platform\google_appengine\google\appengine\tools\devappserver2\devappserver2.py", >>>> >>>> line 454, in <module> >>>> main() >>>> File "C:\Users\David\AppData\Local\Google\Cloud >>>> SDK\google-cloud-sdk\platform\google_appengine\google\appengine\tools\devappserver2\devappserver2.py", >>>> >>>> line 442, in main >>>> dev_server.start(options) >>>> File "C:\Users\David\AppData\Local\Google\Cloud >>>> SDK\google-cloud-sdk\platform\google_appengine\google\appengine\tools\devappserver2\devappserver2.py", >>>> >>>> line 202, in start >>>> options.api_host, apiserver.port, wsgi_request_info_) >>>> File "C:\Users\David\AppData\Local\Google\Cloud >>>> SDK\google-cloud-sdk\platform\google_appengine\google\appengine\tools\devappserver2\dispatcher.py", >>>> >>>> line 262, in start >>>> ssl_port) >>>> File "C:\Users\David\AppData\Local\Google\Cloud >>>> SDK\google-cloud-sdk\platform\google_appengine\google\appengine\tools\devappserver2\dispatcher.py", >>>> >>>> line 403, in _create_module >>>> ssl_port=ssl_port) >>>> File "C:\Users\David\AppData\Local\Google\Cloud >>>> SDK\google-cloud-sdk\platform\google_appengine\google\appengine\tools\devappserver2\module.py", >>>> >>>> line 1299, in __init__ >>>> super(AutoScalingModule, self).__init__(**kwargs) >>>> File "C:\Users\David\AppData\Local\Google\Cloud >>>> SDK\google-cloud-sdk\platform\google_appengine\google\appengine\tools\devappserver2\module.py", >>>> >>>> line 583, in __init__ >>>> self._module_configuration) >>>> File "C:\Users\David\AppData\Local\Google\Cloud >>>> SDK\google-cloud-sdk\platform\google_appengine\google\appengine\tools\devappserver2\module.py", >>>> >>>> line 223, in _create_instance_factory >>>> sorted(repr(k) for k in runtime_factories.FACTORIES)))) >>>> RuntimeError: Unknown runtime 'go111'; supported runtimes are 'custom', >>>> 'go', 'java', 'java7', 'java8', 'php55', 'php72', 'python', >>>> 'python-compat', 'python27'. >>>> >>>> >>>> >>>> On Wednesday, January 16, 2019 at 12:51:56 PM UTC-6, George (Cloud >>>> Platform Support) wrote: >>>>> >>>>> Hello David, >>>>> >>>>> What is your app's directory structure? What directory were you in, >>>>> when running go run? What happens if you run dev_appserver.py app.yaml in >>>>> the directory where your app.yaml resides? Is it ignored as well? You may >>>>> refer to the "Serving Static Content" documentation page >>>>> <https://cloud.google.com/appengine/docs/standard/go/building-app/serving-static-files> >>>>> . >>>>> >>>>> This discussion group is oriented more towards general opinions, >>>>> trends, and issues of general nature touching the app engine. For coding >>>>> and programming architecture, as well as setting up Go apps, you may be >>>>> better served in dedicated forums such as stackoverflow, where >>>>> experienced >>>>> programmers are within reach and ready to help. >>>>> >>>> -- 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/191dd24f-bd5d-44a2-90ec-0cec4838a3ac%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
