Google I/O 2015 web app
appcomponent are installed, you'll need to do a one-off configuration by executing the following command:
gcloud config set project <project-id>. Project ID can be any non-empty string if you just want to run the app locally.
git clone https://github.com/GoogleChrome/ioweb2015.git
If you plan on modifying source code, be a good citizen and:
- Install EditorConfig plugin for your favourite browser. The plugin should automatically pick up the .editorconfig settings.
- Obey the pre-commit hook that's installed as part of
gulp serve to start a standalone backend, while still enjoying live-reload.
You'll need Go for that.
Normally the app is running in "dev" environment but you can change that
--env argument to the gulp task:
# run in dev mode, default: gulp serve # set app environment to production: gulp serve --env prod # or run as if we were in staging: gulp serve --env stage
Not that this does not change the way the backend code is compiled or the front-end is built. It merely changes a variable values, which the app takes into account when rendering a page or responding to a request.
prod requires real credentials when accessing external services.
You'll need to run a one-off
gulp decrypt which will decrypt a service account private key.
You can also use GAE dev appserver by running
gulp serve:gae. This is closer to what
we're using in our webapp environment but a bit slower on startup.
gcloud tool and
app component to do this.
To change the app environment when using GAE SDK, provide
# run in dev mode, default: gulp serve:gae # set app environment to production: gulp serve:gae --env prod # or run as if we were in staging: gulp serve:gae --env stage
Other arguments are:
--no-watchdon't watch for file changes and recompile relative bits.
--openopen serving url in a new browser tab on start.
--reloadenable live reload. Always watches for file changes;
--no-watchwill have no effect.
gulp. This will create
dist directory with both front-end and backend parts, ready for deploy.
Note: Build won't succeed if either
gulp jshint or
gulp jscs reports errors.
You can also serve the build from
dist by running
and navigating to http://localhost:8080.
serve:dist runs the app in
prod mode by default. You can change that
by providing the
--env argument as with other
serve tasks. For instance:
# run in stage instead of prod gulp serve:dist --env stage
To deploy complete application on App Engine:
gulpwhich will build both frontend and backend in
gcloud preview app deploy dist/backend --version <v>.
The app will be deployed to the project configured in
To check which project you're deploying to, run
gcloud config list
and look for
project = ... line.
Backend is written in Go. It can run on either Google App Engine or any other platform as a standalone binary program.
gulp backend will build a self-sufficient backend server and place the binary in
gulp backend:test will run backend server tests. If, while working on the backend, you feel tired
of running the command again and again, use
gulp backend:test --watch to watch for file changes
and re-run tests automatically.
--gae cmd line argument to the test task to run GAE-based tests.
A list of tools to help in a debugging process. NOT available in prod
Proxy with the service account credentials
The backend will GET
some-url and respond back with the original
status code, content-type header and the content.
Useful for browsing original CMS data on staging GCS bucket:
List contents of Google Drive AppFolder.
Send GCM push notifications
Follow instructions on that page.
On staging server this is go/iowastaging/debug/push
Re-sync local datastore with remote
Frontend tests are run via https://github.com/Polymer/web-component-tester
Configuration is in wct.conf.js.
To run tests, install wct globally:
npm install -g web-component-tester