]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server.js
OAuth server: first draft
[github/Chocobozzz/PeerTube.git] / server.js
index cf594453d24172a63a3642295385e9c34aca8899..f9925eb247c04afbbcecc6fe1ea5616cced3a69f 100644 (file)
--- a/server.js
+++ b/server.js
@@ -119,6 +119,14 @@ app.use(function (err, req, res, next) {
   res.sendStatus(err.status || 500)
 })
 
+// TODO: move into initializer
+require('./server/models/users').createClient('coucou', [ 'password' ], function (err, id) {
+  if (err) throw err
+  logger.info('Client id: ' + id)
+
+  require('./server/models/users').createUser('floflo', 'coucou', function () {})
+})
+
 // ----------- Create the certificates if they don't already exist -----------
 peertubeCrypto.createCertsIfNotExist(function (err) {
   if (err) throw err