Skip to content
This repository has been archived by the owner on Jan 7, 2020. It is now read-only.

Implement webRTC signalling #363

Merged
merged 9 commits into from Mar 5, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 2 additions & 1 deletion package.json
Expand Up @@ -13,7 +13,8 @@
"pack:webhosting": "cd web_hosting_manager && yarn package && yarn post-package",
"post-pack:webhosting": "cd web_hosting_manager && yarn post-package",
"pack:email": "cd email_app && yarn package && yarn post-package",
"post-pack:email": "cd email_app && yarn post-package"
"post-pack:email": "cd email_app && yarn post-package",
"test": "echo \"No test specified\" && exit 0"
},
"dependencies": {
"archiver": "^2.0.3",
Expand Down
8 changes: 8 additions & 0 deletions safe_webrtc_example/.babelrc
@@ -0,0 +1,8 @@
{
"presets": [
"react",
"es2015",
"stage-1"
],
"plugins": ["transform-decorators-legacy", "transform-object-rest-spread", "transform-async-to-generator"]
}
2 changes: 2 additions & 0 deletions safe_webrtc_example/.gitignore
@@ -0,0 +1,2 @@
node_modules
dist
21 changes: 21 additions & 0 deletions safe_webrtc_example/LICENSE
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2017 MaidSafe

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
53 changes: 53 additions & 0 deletions safe_webrtc_example/README.md
@@ -0,0 +1,53 @@
# SAFE WebRTC Example
Webrtc secure signalling example application on SAFE Network.

> NOTE: This application is supported only on latest [Peruse](https://github.com/joshuef/peruse/releases/) application.
# Install

First, clone the repo via git:
```
$ git clone https://github.com/maidsafe/safe_examples && cd safe_examples/safe_webrtc_example
```

And then install Node.js dependencies.

```
$ yarn
```

# Configure STUN and TURN server

Configure the STUN and TURN server in `app/constants.js` before building the application.

```
CONFIG: {
SERVER: {
iceServers: [
{ url: 'STUN_SERVER_URL' }, // fill STUN Server url
{
url: 'TURN_SERVER_URL', // fill turn server url
credential: 'TURN_PASSWORD', // fill turn server password
username: 'TURN_USERNAME' // fill turn server username
},
]
},
}
```

# Build

Bundle the application to host it on SAFE Network:
```
$ yarn build
```

Bundled files are found within `dist` folder.


# Run

To open application on `localhost` run,
```
$ yarn start
```
and open `localhost/<PUBLIC ID>:8080/` on Peruse application.