Prepare folders structure for angular app
This commit is contained in:
parent
b2ff5e3e68
commit
b9a3e09ad5
|
@ -2,13 +2,11 @@
|
|||
|
||||
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}',
|
||||
|
|
Before Width: | Height: | Size: 2.3 KiB After Width: | Height: | Size: 2.3 KiB |
Before Width: | Height: | Size: 673 B After Width: | Height: | Size: 673 B |
28
server.js
28
server.js
|
@ -14,7 +14,7 @@ var WebSocketServer = require('ws').Server
|
|||
var app = express()
|
||||
|
||||
// ----------- Checker -----------
|
||||
var checker = require('./initializers/checker')
|
||||
var checker = require('./server/initializers/checker')
|
||||
|
||||
var miss = checker.checkConfig()
|
||||
if (miss.length !== 0) {
|
||||
|
@ -25,16 +25,16 @@ checker.createDirectoriesIfNotExist()
|
|||
|
||||
// ----------- 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')
|
||||
|
@ -67,11 +67,7 @@ app.use(require('connect-livereload')({
|
|||
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
|
||||
|
|
|
@ -1,8 +0,0 @@
|
|||
extends layout
|
||||
|
||||
block content
|
||||
h1= message
|
||||
if error
|
||||
h2= error.status
|
||||
pre #{error.stack}
|
||||
|
|
@ -1,3 +0,0 @@
|
|||
footer
|
||||
|
||||
| PeerTube, CopyLeft 2015
|
|
@ -1,9 +0,0 @@
|
|||
.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')
|
|
@ -1,15 +0,0 @@
|
|||
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
|
|
@ -1,15 +0,0 @@
|
|||
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
|
|
@ -1,17 +0,0 @@
|
|||
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
|
Loading…
Reference in New Issue