Skip to content
This repository has been archived by the owner on Oct 24, 2023. It is now read-only.

Commit

Permalink
updated lib
Browse files Browse the repository at this point in the history
  • Loading branch information
rejetto committed Jan 26, 2014
1 parent 59df6ab commit 32134fe
Show file tree
Hide file tree
Showing 3 changed files with 179 additions and 107 deletions.
30 changes: 21 additions & 9 deletions main.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,29 +2,41 @@
* @author Massimo Melina <[email protected]>
*/
require('./lib/libs');
//debug();
debug();

GLOBAL.vfs = new vfsLib.Vfs();
//vfs.root.set('G:\\music');
/*vfs.root.set('C:\\vedere')//.add('c:\\data\\pics\\fantasy');
vfs.root.add('2', function(err,node){ node.add('3') });
vfs.root.add('C:\\temp');
vfs.root.add('C:\\windows\\system32'); // used to test many files (2k+)
*/

//vfs.readFrom('C:\\temp\\test');

vfs.root.set('C:\\music', function(err,node){
assert(!err);
node.add('archive', L('$2.add("3")'));
//vfs.writeTo('C:\\temp\\test');
});
//vfs.root.set('C:\\vedere')//.add('c:\\data\\pics\\fantasy');
//vfs.root.add('C:\\temp');
//vfs.root.add('C:\\windows\\system32'); // used to test many files (2k+)


GLOBAL.fileServer = require('./file-server');
fileServer.start({ port:80, ip:'0.0.0.0' });

GLOBAL.adminServer = require('./admin-server');
adminServer.start({ port:88, ip:'127.0.0.1' });

// still trying
function debug(){
require('repl').start({
useGlobal: true,
input: process.stdin,
output: process.stdout
});

require('net').createServer(function(sock){
require('repl').start({
prompt: 'DBG> ',
input: sock,
output: sock,
useGlobal: true,
useGlobal: true
}).on('exit', function(){
sock.end();
});
Expand Down
2 changes: 1 addition & 1 deletion speedtest.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* @author Massimo Melina <[email protected]>
*/
var v = process.argv;
var myGigFile = v.length >= 3 ? v[2] : '/bigfile.avi';
var myGigFile = v.length >= 3 ? v[2] : '/vedere/Valzer con Bashir (2008).avi';

var http = require('http');
var fs = require('fs');
Expand Down
Loading

0 comments on commit 32134fe

Please sign in to comment.