module.exports = function (grunt) {
var paths = {
- dist: 'dist',
- jade: 'views/**/**/*.jade',
css: 'public/stylesheets/*.css',
scss: 'public/stylesheets/application.scss',
vendor: 'public/stylesheets/vendor',
js: 'public/javascripts/*.js',
- routes: 'controllers/**/*.js',
+ routes: './server/controllers/**/*.js',
main: './server.js',
browserified: 'public/javascripts/bundle.js',
img: 'public/images/*.{png,jpg,jpeg,gif,webp,svg}',
var app = express()
// ----------- Checker -----------
-var checker = require('./initializers/checker')
+var checker = require('./server/initializers/checker')
var miss = checker.checkConfig()
if (miss.length !== 0) {
// ----------- PeerTube modules -----------
var config = require('config')
-var constants = require('./initializers/constants')
-var customValidators = require('./helpers/customValidators')
-var database = require('./initializers/database')
-var logger = require('./helpers/logger')
-var peertubeCrypto = require('./helpers/peertubeCrypto')
-var poolRequests = require('./lib/poolRequests')
-var routes = require('./controllers')
-var utils = require('./helpers/utils')
-var videos = require('./lib/videos')
-var webtorrent = require('./lib/webtorrent')
+var constants = require('./server/initializers/constants')
+var customValidators = require('./server/helpers/customValidators')
+var database = require('./server/initializers/database')
+var logger = require('./server/helpers/logger')
+var peertubeCrypto = require('./server/helpers/peertubeCrypto')
+var poolRequests = require('./server/lib/poolRequests')
+var routes = require('./server/controllers')
+var utils = require('./server/helpers/utils')
+var videos = require('./server/lib/videos')
+var webtorrent = require('./server/lib/webtorrent')
// Get configurations
var port = config.get('listen.port')
require('segfault-handler').registerHandler()
// Static files
-app.use(express.static(path.join(__dirname, '/public'), { maxAge: 0 }))
-
-// Jade template from ./views directory
-app.set('views', path.join(__dirname, '/views'))
-app.set('view engine', 'jade')
+app.use(express.static(path.join(__dirname, '/app'), { maxAge: 0 }))
// API routes
var api_route = '/api/' + constants.API_VERSION
+++ /dev/null
-extends layout
-
-block content
- h1= message
- if error
- h2= error.status
- pre #{error.stack}
-
+++ /dev/null
-footer
-
- | PeerTube, CopyLeft 2015
+++ /dev/null
-.navbar.navbar-default
- .container-fluid
- .navbar-header
- a.navbar-brand(href='/') PeerTube
- .navbar-header
- form.navbar-form(role='search')
- .form-group.search-group
- input.form-control#search-video(type='text' name='search_video' placeholder='Search a video...')
- a.search-btn.btn.btn-link.glyphicon.glyphicon-search(type='submit')
\ No newline at end of file
+++ /dev/null
-extends layout
-
-block content
- div(class='container')
- div(class='row')
- include panel
-
- div(id='ajax_load' class='col-md-9')
-
-
- include footer
-
- // build:js /javascripts/global.min.js
- script(src='/javascripts/bundle.js')
- // endbuild
+++ /dev/null
-doctype html
-html
- head
- link(rel='icon' type='image/png' href='/images/favicon.png')
- meta(name='viewport' content='width=device-width, initial-scale=1')
- title= title
-
- // build:css /stylesheets/global.min.css
- each file in [ 'global' ]
- link(rel='stylesheet', href='/stylesheets/' + file + '.css')
- // endbuild
-
- body
- include header
- block content
+++ /dev/null
-menu(class='col-md-2')
-
- div(id='panel_get_videos' class='panel_button')
- span(class='glyphicon glyphicon-list')
- | Get videos
-
- div(id='panel_upload_video' class='panel_button')
- span(class='glyphicon glyphicon-cloud-upload')
- | Upload a video
-
- div(id='panel_make_friends' class='panel_button')
- span(class='glyphicon glyphicon-user')
- | Make friends
-
- div(id='panel_quit_friends' class='panel_button')
- span(class='glyphicon glyphicon-plane')
- | Quit friends