Restrudturing app + ES6 + Init socket + Init models

This commit is contained in:
Bruno SIMON
2016-06-02 19:49:00 +02:00
parent 5697cf1b8e
commit 0c2955c01b
9 changed files with 474 additions and 71 deletions
+3 -40
View File
@@ -1,41 +1,4 @@
// Depedencies
var chokidar = require( 'chokidar' ),
path = require( 'path' ),
colors = require( 'colors' );
'use strict'
// Working directory
var cwd = process.cwd();
// Watcher
var watcher = chokidar.watch(
cwd,
{
ignored : /[\/\\]\./,
ignoreInitial : true
}
);
watcher.on( 'add', ( path ) =>
{
console.log( 'add:'.green.bold, path );
} );
watcher.on( 'change', ( path ) =>
{
console.log( 'change:'.green.bold, path );
} );
watcher.on( 'unlink', ( path ) =>
{
console.log( 'unlink:'.green.bold, path );
} );
watcher.on( 'addDir', ( path ) =>
{
console.log( 'addDir:'.green.bold, path );
} );
watcher.on( 'unlinkDir', ( path ) =>
{
console.log( 'unlinkDir:'.green.bold, path );
} );
let App = require( './app.class.js' ),
app = new App()