diff options
-rw-r--r-- | README.md | 4 | ||||
-rw-r--r-- | middlewares/index.js | 2 | ||||
-rw-r--r-- | package.json | 4 | ||||
-rwxr-xr-x | scripts/clean_test.sh | 2 | ||||
-rw-r--r-- | server.js | 2 | ||||
-rw-r--r-- | src/database.js | 2 | ||||
-rw-r--r-- | src/pods.js | 4 | ||||
-rw-r--r-- | src/utils.js | 8 | ||||
-rw-r--r-- | views/footer.jade | 2 | ||||
-rw-r--r-- | views/index.jade | 22 |
10 files changed, 26 insertions, 26 deletions
@@ -1,4 +1,4 @@ | |||
1 | # PeTube | 1 | # PeerTube |
2 | 2 | ||
3 | Prototype of a decentralized video streaming platform using P2P (bittorent) directly in the web browser with [webtorrent](https://github.com/feross/webtorrent). | 3 | Prototype of a decentralized video streaming platform using P2P (bittorent) directly in the web browser with [webtorrent](https://github.com/feross/webtorrent). |
4 | 4 | ||
@@ -45,7 +45,7 @@ Prototype of a decentralized video streaming platform using P2P (bittorent) dire | |||
45 | ### Test It! | 45 | ### Test It! |
46 | 46 | ||
47 | $ git clone https://github.com/Chocobozzz/PeerTube | 47 | $ git clone https://github.com/Chocobozzz/PeerTube |
48 | $ cd PeopleTube | 48 | $ cd PeerTube |
49 | # npm install -g electron-prebuilt | 49 | # npm install -g electron-prebuilt |
50 | $ npm install | 50 | $ npm install |
51 | $ npm start | 51 | $ npm start |
diff --git a/middlewares/index.js b/middlewares/index.js index c8139075a..6368d791a 100644 --- a/middlewares/index.js +++ b/middlewares/index.js | |||
@@ -39,7 +39,7 @@ | |||
39 | var signature_ok = crt.hashAndVerify('sha256', new Buffer(req.body.signature.url).toString('hex'), req.body.signature.signature, 'hex') | 39 | var signature_ok = crt.hashAndVerify('sha256', new Buffer(req.body.signature.url).toString('hex'), req.body.signature.signature, 'hex') |
40 | 40 | ||
41 | if (signature_ok === true) { | 41 | if (signature_ok === true) { |
42 | var myKey = ursa.createPrivateKey(fs.readFileSync(utils.certDir + 'petube.key.pem')) | 42 | var myKey = ursa.createPrivateKey(fs.readFileSync(utils.certDir + 'peertube.key.pem')) |
43 | var decryptedKey = myKey.decrypt(req.body.key, 'hex', 'utf8') | 43 | var decryptedKey = myKey.decrypt(req.body.key, 'hex', 'utf8') |
44 | logger.debug(decryptedKey) | 44 | logger.debug(decryptedKey) |
45 | req.body.data = JSON.parse(utils.symetricDecrypt(req.body.data, decryptedKey)) | 45 | req.body.data = JSON.parse(utils.symetricDecrypt(req.body.data, decryptedKey)) |
diff --git a/package.json b/package.json index b52838f37..e704e7c1d 100644 --- a/package.json +++ b/package.json | |||
@@ -1,6 +1,6 @@ | |||
1 | { | 1 | { |
2 | "name": "petube", | 2 | "name": "peertube", |
3 | "description": "none", | 3 | "description": "Prototype of a decentralized video streaming platform using P2P (bittorent) directly in the web browser with webtorrent.", |
4 | "version": "0.0.1", | 4 | "version": "0.0.1", |
5 | "private": true, | 5 | "private": true, |
6 | "engines": { | 6 | "engines": { |
diff --git a/scripts/clean_test.sh b/scripts/clean_test.sh index 8d71215f2..8868cbddf 100755 --- a/scripts/clean_test.sh +++ b/scripts/clean_test.sh | |||
@@ -1,5 +1,5 @@ | |||
1 | #!/bin/bash | 1 | #!/bin/bash |
2 | 2 | ||
3 | printf "use petube-test1;\ndb.dropDatabase();\nuse petube-test2;\ndb.dropDatabase();\nuse petube-test3;\ndb.dropDatabase();" | mongo | 3 | printf "use peertube-test1;\ndb.dropDatabase();\nuse peertube-test2;\ndb.dropDatabase();\nuse peertube-test3;\ndb.dropDatabase();" | mongo |
4 | 4 | ||
5 | rm -rf ./test1 ./test2 ./test3 | 5 | rm -rf ./test1 ./test2 ./test3 |
@@ -24,7 +24,7 @@ | |||
24 | 24 | ||
25 | checker.createDirectories() | 25 | checker.createDirectories() |
26 | 26 | ||
27 | // ----------- PeTube modules ----------- | 27 | // ----------- PeerTube modules ----------- |
28 | var config = require('config') | 28 | var config = require('config') |
29 | var logger = require('./src/logger') | 29 | var logger = require('./src/logger') |
30 | var routes = require('./routes') | 30 | var routes = require('./routes') |
diff --git a/src/database.js b/src/database.js index 6fbd5dbc8..020bfd961 100644 --- a/src/database.js +++ b/src/database.js | |||
@@ -6,7 +6,7 @@ | |||
6 | 6 | ||
7 | var logger = require('./logger') | 7 | var logger = require('./logger') |
8 | 8 | ||
9 | var dbname = 'petube' + config.get('database.suffix') | 9 | var dbname = 'peertube' + config.get('database.suffix') |
10 | var host = config.get('database.host') | 10 | var host = config.get('database.host') |
11 | var port = config.get('database.port') | 11 | var port = config.get('database.port') |
12 | 12 | ||
diff --git a/src/pods.js b/src/pods.js index 9d6539685..30d465ee5 100644 --- a/src/pods.js +++ b/src/pods.js | |||
@@ -53,7 +53,7 @@ | |||
53 | return callback(err) | 53 | return callback(err) |
54 | } | 54 | } |
55 | 55 | ||
56 | fs.readFile(utils.certDir + 'petube.pub', 'utf8', function (err, cert) { | 56 | fs.readFile(utils.certDir + 'peertube.pub', 'utf8', function (err, cert) { |
57 | if (err) { | 57 | if (err) { |
58 | logger.error('Cannot read cert file.', { error: err }) | 58 | logger.error('Cannot read cert file.', { error: err }) |
59 | return callback(err) | 59 | return callback(err) |
@@ -99,7 +99,7 @@ | |||
99 | 99 | ||
100 | pods.makeFriends = function (callback) { | 100 | pods.makeFriends = function (callback) { |
101 | logger.debug('Read public key...') | 101 | logger.debug('Read public key...') |
102 | fs.readFile(utils.certDir + 'petube.pub', 'utf8', function (err, cert) { | 102 | fs.readFile(utils.certDir + 'peertube.pub', 'utf8', function (err, cert) { |
103 | if (err) { | 103 | if (err) { |
104 | logger.error('Cannot read public cert.', { error: err }) | 104 | logger.error('Cannot read public cert.', { error: err }) |
105 | return callback(err) | 105 | return callback(err) |
diff --git a/src/utils.js b/src/utils.js index 0b21565dd..82a62c43f 100644 --- a/src/utils.js +++ b/src/utils.js | |||
@@ -63,7 +63,7 @@ | |||
63 | 63 | ||
64 | // Signature ? | 64 | // Signature ? |
65 | if (all.method === 'POST' && all.data && all.sign === true) { | 65 | if (all.method === 'POST' && all.data && all.sign === true) { |
66 | var myKey = ursa.createPrivateKey(fs.readFileSync(utils.certDir + 'petube.key.pem')) | 66 | var myKey = ursa.createPrivateKey(fs.readFileSync(utils.certDir + 'peertube.key.pem')) |
67 | signature = myKey.hashAndSign('sha256', url, 'utf8', 'hex') | 67 | signature = myKey.hashAndSign('sha256', url, 'utf8', 'hex') |
68 | } | 68 | } |
69 | 69 | ||
@@ -111,7 +111,7 @@ | |||
111 | } | 111 | } |
112 | 112 | ||
113 | utils.certsExist = function (callback) { | 113 | utils.certsExist = function (callback) { |
114 | fs.exists(utils.certDir + 'petube.key.pem', function (exists) { | 114 | fs.exists(utils.certDir + 'peertube.key.pem', function (exists) { |
115 | return callback(exists) | 115 | return callback(exists) |
116 | }) | 116 | }) |
117 | } | 117 | } |
@@ -125,14 +125,14 @@ | |||
125 | } | 125 | } |
126 | 126 | ||
127 | logger.debug('Gen RSA keys...') | 127 | logger.debug('Gen RSA keys...') |
128 | openssl.exec('genrsa', { 'out': utils.certDir + 'petube.key.pem' }, function (err) { | 128 | openssl.exec('genrsa', { 'out': utils.certDir + 'peertube.key.pem' }, function (err) { |
129 | if (err) { | 129 | if (err) { |
130 | logger.error('Cannot create private key on this pod.', { error: err }) | 130 | logger.error('Cannot create private key on this pod.', { error: err }) |
131 | return callback(err) | 131 | return callback(err) |
132 | } | 132 | } |
133 | 133 | ||
134 | logger.debug('Manage public key...') | 134 | logger.debug('Manage public key...') |
135 | openssl.exec('rsa', { 'in': utils.certDir + 'petube.key.pem', 'pubout': true, 'out': utils.certDir + 'petube.pub' }, function (err) { | 135 | openssl.exec('rsa', { 'in': utils.certDir + 'peertube.key.pem', 'pubout': true, 'out': utils.certDir + 'peertube.pub' }, function (err) { |
136 | if (err) { | 136 | if (err) { |
137 | logger.error('Cannot create public key on this pod .', { error: err }) | 137 | logger.error('Cannot create public key on this pod .', { error: err }) |
138 | return callback(err) | 138 | return callback(err) |
diff --git a/views/footer.jade b/views/footer.jade index 7fd9769b6..c7754f584 100644 --- a/views/footer.jade +++ b/views/footer.jade | |||
@@ -1,3 +1,3 @@ | |||
1 | footer | 1 | footer |
2 | 2 | ||
3 | | PeTube, CopyLeft 2015 \ No newline at end of file | 3 | | PeerTube, CopyLeft 2015 |
diff --git a/views/index.jade b/views/index.jade index 70f19e9fa..21cedb324 100644 --- a/views/index.jade +++ b/views/index.jade | |||
@@ -1,24 +1,24 @@ | |||
1 | extends layout | 1 | extends layout |
2 | 2 | ||
3 | block content | 3 | block content |
4 | 4 | ||
5 | div(class='container') | 5 | div(class='container') |
6 | 6 | ||
7 | header(class='row') | 7 | header(class='row') |
8 | div(class='col-md-2') | 8 | div(class='col-md-2') |
9 | h4 PeopleTube | 9 | h4 PeerTube |
10 | 10 | ||
11 | div(class='col-md-8') | 11 | div(class='col-md-8') |
12 | input(type='text' id='search_video' name='search_video' class='form-control' placeholder='Search a video...') | 12 | input(type='text' id='search_video' name='search_video' class='form-control' placeholder='Search a video...') |
13 | 13 | ||
14 | div(class='row') | 14 | div(class='row') |
15 | include panel | 15 | include panel |
16 | 16 | ||
17 | div(id='ajax_load' class='col-md-9') | 17 | div(id='ajax_load' class='col-md-9') |
18 | 18 | ||
19 | 19 | ||
20 | include footer | 20 | include footer |
21 | 21 | ||
22 | // build:js /javascripts/global.min.js | 22 | // build:js /javascripts/global.min.js |
23 | script(src='/javascripts/bundle.js') | 23 | script(src='/javascripts/bundle.js') |
24 | // endbuild \ No newline at end of file | 24 | // endbuild |