diff options
Diffstat (limited to 'server.js')
-rw-r--r-- | server.js | 14 |
1 files changed, 2 insertions, 12 deletions
@@ -21,15 +21,13 @@ if (miss.length !== 0) { | |||
21 | throw new Error('Miss some configurations keys : ' + miss) | 21 | throw new Error('Miss some configurations keys : ' + miss) |
22 | } | 22 | } |
23 | 23 | ||
24 | checker.createDirectoriesIfNotExist() | ||
25 | |||
26 | // ----------- PeerTube modules ----------- | 24 | // ----------- PeerTube modules ----------- |
27 | var config = require('config') | 25 | var config = require('config') |
28 | var constants = require('./server/initializers/constants') | 26 | var constants = require('./server/initializers/constants') |
29 | var customValidators = require('./server/helpers/customValidators') | 27 | var customValidators = require('./server/helpers/customValidators') |
30 | var database = require('./server/initializers/database') | 28 | var database = require('./server/initializers/database') |
29 | var installer = require('./server/initializers/installer') | ||
31 | var logger = require('./server/helpers/logger') | 30 | var logger = require('./server/helpers/logger') |
32 | var peertubeCrypto = require('./server/helpers/peertubeCrypto') | ||
33 | var poolRequests = require('./server/lib/poolRequests') | 31 | var poolRequests = require('./server/lib/poolRequests') |
34 | var routes = require('./server/controllers') | 32 | var routes = require('./server/controllers') |
35 | var utils = require('./server/helpers/utils') | 33 | var utils = require('./server/helpers/utils') |
@@ -119,17 +117,9 @@ app.use(function (err, req, res, next) { | |||
119 | res.sendStatus(err.status || 500) | 117 | res.sendStatus(err.status || 500) |
120 | }) | 118 | }) |
121 | 119 | ||
122 | // TODO: move into initializer | 120 | installer.installApplication(function (err) { |
123 | require('./server/models/users').createClient('coucou', [ 'password' ], function (err, id) { | ||
124 | if (err) throw err | 121 | if (err) throw err |
125 | logger.info('Client id: ' + id) | ||
126 | |||
127 | require('./server/models/users').createUser('floflo', 'coucou', function () {}) | ||
128 | }) | ||
129 | 122 | ||
130 | // ----------- Create the certificates if they don't already exist ----------- | ||
131 | peertubeCrypto.createCertsIfNotExist(function (err) { | ||
132 | if (err) throw err | ||
133 | // Create/activate the webtorrent module | 123 | // Create/activate the webtorrent module |
134 | webtorrent.create(function () { | 124 | webtorrent.create(function () { |
135 | function cleanForExit () { | 125 | function cleanForExit () { |