Skip to content

Commit 139da5b

Browse files
committedOct 6, 2015
Cleaned up some wording, fixed lint issues and moved server.js to test/
1 parent ed01604 commit 139da5b

File tree

4 files changed

+17
-7
lines changed

4 files changed

+17
-7
lines changed
 

‎README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,14 @@ Some of the samples use new browser features. They may only work in Chrome Canar
99
All of the samples use [adapter.js](https://github.com/webrtc/adapter), a shim to insulate apps from spec changes and prefix differences. In fact, the standards and protocols used for WebRTC implementations are highly stable, and there are only a few prefixed names. For full interop information, see [webrtc.org/web-apis/interop](http://www.webrtc.org/web-apis/interop).
1010

1111
In Chrome and Opera, all samples that use `getUserMedia()` must be run from a server. Calling `getUserMedia()` from a file:// URL will work in Firefox, but fail silently in Chrome and Opera.
12-
To start a simple server for development, run `npm install && node server.js` then navigate
13-
your browser to `https://localhost:8080`.
1412

1513
[webrtc.org/testing](http://www.webrtc.org/testing) lists command line flags useful for development and testing with Chrome.
1614

1715
For more information about WebRTC, we maintain a list of [WebRTC Resources](https://docs.google.com/document/d/1idl_NYQhllFEFqkGQOLv8KBK8M3EVzyvxnKkHl4SuM8/edit). If you've never worked with WebRTC, we recommend you start with the 2013 Google I/O [WebRTC presentation](http://www.youtube.com/watch?v=p2HzZkd2A40).
1816

19-
Patches and issues welcome! See [CONTRIBUTING](https://github.com/webrtc/samples/blob/gh-pages/CONTRIBUTING.md) for instructions. All contributors must sign a contributor license agreement before code can be accepted. Please complete the agreement for an [individual](https://developers.google.com/open-source/cla/individual) or a [corporation](https://developers.google.com/open-source/cla/corporate) as appropriate. The [Developer's Guide](https://bit.ly/webrtcdevguide) for this repo has more information about code style, structure and validation.
17+
Patches and issues welcome! See [CONTRIBUTING](https://github.com/webrtc/samples/blob/gh-pages/CONTRIBUTING.md) for instructions. All contributors must sign a contributor license agreement before code can be accepted. Please complete the agreement for an [individual](https://developers.google.com/open-source/cla/individual) or a [corporation](https://developers.google.com/open-source/cla/corporate) as appropriate.
18+
The [Developer's Guide](https://bit.ly/webrtcdevguide) for this repo has more information about code style, structure and validation.
19+
Head over to [test/README.md](https://github.com/webrtc/samples/blob/gh-pages/test/README.md) and get started developing.
2020

2121
## The demos ##
2222

‎index.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ <h1>WebRTC samples</h1>
6666

6767
<p>For more information about WebRTC, we maintain a list of resources at <a href="https://g.co/webrtc">g.co/webrtc</a>. If you've never worked with WebRTC, we recommend you start with the 2013 Google I/O <a href="https://www.youtube.com/watch?v=p2HzZkd2A40">WebRTC presentation</a>.</p>
6868

69-
<p>Patches and issues welcome! See <a href="https://github.com/webrtc/samples/blob/gh-pages/CONTRIBUTING.md">CONTRIBUTING.md</a> for instructions. The <a href="https://bit.ly/webrtcdevguide">Developer's Guide</a> for this repo has more information about code style, structure and validation.</p>
69+
<p>Patches and issues welcome! See <a href="https://github.com/webrtc/samples/blob/gh-pages/CONTRIBUTING.md">CONTRIBUTING.md</a> for instructions. The <a href="https://bit.ly/webrtcdevguide">Developer's Guide</a> for this repo has more information about code style, structure and validation. Head over to <a href="test/README.md">test/README.md</a> and get started developing.</p>
7070

7171
</section>
7272

‎test/README.md

+6
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,12 @@ git clone https://github.com/webrtc/samples.git
1818
npm install
1919
```
2020

21+
### Start web server for development
22+
```bash
23+
To start a simple server for development, run `node test/server.js` then navigate
24+
your browser to `https://localhost:8080`.
25+
```
26+
2127
#### Run tests
2228
Runs grunt and tests in test/tests.js.
2329
```bash

‎server.js ‎test/server.js

+7-3
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,20 @@
11
/*
2-
* Copyright (c) 2014 The WebRTC project authors. All Rights Reserved.
2+
* Copyright (c) 2015 The WebRTC project authors. All Rights Reserved.
33
*
44
* Use of this source code is governed by a BSD-style license
55
* that can be found in the LICENSE file in the root of the source
66
* tree.
77
*/
8+
/* jshint node: true */
9+
/* globals require */
10+
11+
'use strict';
812

913
var express = require('express');
1014
var https = require('https');
1115
var pem = require('pem');
1216

13-
pem.createCertificate({ days:1, selfSigned:true }, function(err, keys) {
17+
pem.createCertificate({days: 1, selfSigned: true}, function(err, keys) {
1418
var options = {
1519
key: keys.serviceKey,
1620
cert: keys.certificate
@@ -20,7 +24,7 @@ pem.createCertificate({ days:1, selfSigned:true }, function(err, keys) {
2024

2125
app.use(express.static('.'));
2226

23-
// Create an HTTPS service
27+
// Create an HTTPS service.
2428
https.createServer(options, app).listen(8080);
2529

2630
console.log('serving on https://localhost:8080');

0 commit comments

Comments
 (0)
Please sign in to comment.