|author||Christoffer Jansson <email@example.com>||Fri Feb 05 09:37:13 2016|
|committer||Christoffer Jansson <firstname.lastname@example.org>||Fri Feb 05 09:37:13 2016|
Add a redirect list
The development AppRTC server can be accessed by visiting http://localhost:8080.
Detailed instructions for running on Ubuntu Linux are provided below.
Install grunt by first installing npm. npm is distributed as part of nodejs.
sudo apt-get install nodejs sudo npm install -g npm
On Ubuntu 14.04 the default packages installs
/usr/bin/nodejs but the
/usr/bin/node executable is required for grunt. This is installed on some Ubuntu package sets; if it is missing, you can add this by installing the
sudo apt-get install nodejs-legacy
It is easiest to install a shared version of
npm using the
-g flag. This will allow you access the
grunt command from
/usr/local/bin. More information can be found on
gruntjs Getting Started.
sudo npm -g install grunt-cli
-g flag will install
grunt-cli to the current directory under the
Finally, you will want to install grunt and required grunt dependencies. This can be done from any directory under your checkout of the webrtc/apprtc repository.
On Ubuntu, you will also need to install the webtest package:
sudo apt-get install python-webtest
Before you start the AppRTC dev server and *everytime you update the source code you need to recompile the App Engine package by running,
Start the AppRTC dev server from the
out/app_engine directory by running the Google App Engine SDK dev server,
<path to sdk>/dev_appserver.py ./out/app_engine
Then navigate to http://localhost:8080 in your browser (given it's on the same machine).
All tests by running
To run only the Python tests you can call,
Note that logging is automatically enabled when running on Google App Engine using an implicit service account.
By default, logging to a BigQuery from the development server is disabled. Log information is presented on the console. Unless you are modifying the analytics API you will not need to enable remote logging.
Logging to BigQuery when running LOCALLY requires a
secrets.json containing Service Account credentials to a Google Developer project where BigQuery is enabled. DO NOT COMMIT
secrets.json TO THE REPOSITORY.
To generate a
secrets.json file in the Google Developers Console for your project:
secrets.jsonand place in the directory containing
Analytics class detects that AppRTC is running locally, all data is logged to
analytics table in the
dev dataset. You can bootstrap the
dev dataset by following the instructions in the Bootstrapping/Updating BigQuery.
When running on App Engine the
Analytics class will log to
analytics table in the
prod dataset for whatever project is defined in
bigquery/analytics_schema.json contains the fields used in the BigQuery table. New fields can be added to the schema and the table updated. However, fields cannot be renamed or removed. Caution should be taken when updating the production table as reverting schema updates is difficult.
Update the BigQuery table from the schema by running,
bq update -t prod.analytics bigquery/analytics_schema.json
Initialize the required BigQuery datasets and tables with the following,
bq mk prod bq mk -t prod.analytics bigquery/analytics_schema.json