scss: 'public/stylesheets/application.scss',
vendor: 'public/stylesheets/vendor',
js: 'public/javascripts/*.js',
- src: 'src/*.js',
- routes: 'routes/**/*.js',
+ routes: 'controllers/**/*.js',
main: './server.js',
browserified: 'public/javascripts/bundle.js',
img: 'public/images/*.{png,jpg,jpeg,gif,webp,svg}',
var miscMiddleware = middleware.misc
var reqValidator = middleware.reqValidators.pods
var secureRequest = middleware.reqValidators.remote.secureRequest
- var pods = require('../../../src/pods')
+ var pods = require('../../../models/pods')
function listPods (req, res, next) {
pods.list(function (err, pods_list) {
var middleware = require('../../../middlewares')
var miscMiddleware = middleware.misc
var reqValidator = middleware.reqValidators.remote
- var videos = require('../../../src/videos')
+ var videos = require('../../../models/videos')
function addRemoteVideos (req, res, next) {
videos.addRemotes(req.body.data, function (err, videos) {
var middleware = require('../../../middlewares')
var miscMiddleware = middleware.misc
var reqValidator = middleware.reqValidators.videos
- var videos = require('../../../src/videos')
+ var videos = require('../../../models/videos')
var uploads = config.get('storage.uploads')
;(function () {
'use strict'
- var constants = require('../src/constants')
+ var constants = require('../initializers/constants')
var routes = {
api: require('./api/' + constants.API_VERSION),
var replay = require('request-replay')
var ursa = require('ursa')
- var constants = require('./constants')
+ var constants = require('../initializers/constants')
var logger = require('./logger')
var utils = {}
var mongoose = require('mongoose')
var constants = require('./constants')
- var logger = require('./logger')
+ var logger = require('../helpers/logger')
var dbname = 'peertube' + config.get('database.suffix')
var host = config.get('database.host')
var async = require('async')
- var constants = require('./constants')
- var logger = require('./logger')
- var database = require('./database')
+ var constants = require('../initializers/constants')
+ var logger = require('../helpers/logger')
+ var database = require('../initializers/database')
var pluck = require('lodash-node/compat/collection/pluck')
var PoolRequestsDB = database.PoolRequestsDB
var PodsDB = database.PodsDB
- var utils = require('./utils')
+ var utils = require('../helpers/utils')
var VideosDB = database.VideosDB
var poolRequests = {}
var pathUtils = require('path')
var spawn = require('electron-spawn')
- var logger = require('./logger')
+ var logger = require('../helpers/logger')
var host = config.get('webserver.host')
var port = config.get('webserver.port')
var ursa = require('ursa')
var fs = require('fs')
- var logger = require('../src/logger')
- var utils = require('../src/utils')
- var PodsDB = require('../src/database').PodsDB
+ var logger = require('../helpers/logger')
+ var utils = require('../helpers/utils')
+ var PodsDB = require('../initializers/database').PodsDB
var misc = {}
'use strict'
var checkErrors = require('./utils').checkErrors
- var logger = require('../../src/logger')
+ var logger = require('../../helpers/logger')
var pods = {}
'use strict'
var checkErrors = require('./utils').checkErrors
- var logger = require('../../src/logger')
+ var logger = require('../../helpers/logger')
var remote = {}
'use strict'
var util = require('util')
- var logger = require('../../src/logger')
+ var logger = require('../../helpers/logger')
var utils = {}
'use strict'
var checkErrors = require('./utils').checkErrors
- var VideosDB = require('../../src/database').VideosDB
- var logger = require('../../src/logger')
+ var VideosDB = require('../../initializers/database').VideosDB
+ var logger = require('../../helpers/logger')
var videos = {}
var fs = require('fs')
var request = require('request')
- var constants = require('./constants')
- var logger = require('./logger')
- var PodsDB = require('./database').PodsDB
- var poolRequests = require('./poolRequests')
- var utils = require('./utils')
+ var constants = require('../initializers/constants')
+ var logger = require('../helpers/logger')
+ var PodsDB = require('../initializers/database').PodsDB
+ var poolRequests = require('../lib/poolRequests')
+ var utils = require('../helpers/utils')
var pods = {}
var config = require('config')
var dz = require('dezalgo')
var fs = require('fs')
- var webtorrent = require('./webTorrentNode')
+ var webtorrent = require('../lib/webTorrentNode')
- var logger = require('./logger')
+ var logger = require('../helpers/logger')
var pods = require('./pods')
- var VideosDB = require('./database').VideosDB
+ var VideosDB = require('../initializers/database').VideosDB
var videos = {}
},
"scripts": {
"start": "grunt dev",
- "test": "grunt build && standard && mocha test"
+ "test": "grunt build && standard && mocha tests"
},
"dependencies": {
"async": "^1.2.1",
var app = express()
// ----------- Checker -----------
- var checker = require('./src/checker')
+ var checker = require('./initializers/checker')
var miss = checker.checkConfig()
if (miss.length !== 0) {
// ----------- PeerTube modules -----------
var config = require('config')
- var constants = require('./src/constants')
- var customValidators = require('./src/customValidators')
- var logger = require('./src/logger')
- var poolRequests = require('./src/poolRequests')
- var routes = require('./routes')
- var utils = require('./src/utils')
- var videos = require('./src/videos')
- var webtorrent = require('./src/webTorrentNode')
+ var constants = require('./initializers/constants')
+ var customValidators = require('./helpers/customValidators')
+ var logger = require('./helpers/logger')
+ var poolRequests = require('./lib/poolRequests')
+ var routes = require('./controllers')
+ var utils = require('./helpers/utils')
+ var videos = require('./models/videos')
+ var webtorrent = require('./lib/webTorrentNode')
// Get configurations
var port = config.get('listen.port')
var expect = chai.expect
var utils = require('./utils')
- var webtorrent = require(__dirname + '/../../src/webTorrentNode')
+ var webtorrent = require(__dirname + '/../../lib/webTorrentNode')
webtorrent.silent = true
describe('Test multiple pods', function () {
var fs = require('fs')
var expect = chai.expect
- var webtorrent = require(__dirname + '/../../src/webTorrentNode')
+ var webtorrent = require(__dirname + '/../../lib/webTorrentNode')
webtorrent.silent = true
var utils = require('./utils')