The Google Mirror API allows you to build web-based services that interact with Google Glass. It provides this functionality over a cloud-based API and does not require running code on Glass.
To run this sample, add your client id, client secret, and redirect url in oauth2.keys.json. You can also download this file directly from the Google Developers console. Then run:
node mirror.js