Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nice interface with default dark mode. #34

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
node_modules/
.idea
node_modules
.idea
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Screen Shot
![screenshot](https://raw.githubusercontent.com/efeiefei/node-file-manager/master/example/screenshot.png)
![](/image.png)

# Usage

Expand All @@ -18,6 +18,6 @@ Or
node --harmony index.js -p 8080 -d /path/to
```

We can run node-file-manager in terminal directly. We can specify prot add data root dir by `-p` and `-d`, default with 5000 and scripts directory.
We can run node-file-manager in terminal directly. We can specify prot add data root dir by `-p` and `-d`, default with 8080 and scripts directory.

Then, we can view localhost:8080/ in our browr.
We can see the file in every single device connected to the same wi-fi network by typing the address, which the command line tells you in the browser.
Binary file added image.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
13 changes: 6 additions & 7 deletions lib/index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/usr/bin/env node

var http = require('http')
var koa =require('koa');
var path = require('path');
var tracer = require('tracer');
Expand Down Expand Up @@ -51,11 +51,11 @@ global.C = {

// Start Server
var Tools = require('./tools');

var startServer = function (app, port) {
app.listen(port);
C.logger.info('listening on *.' + port);
};
require('dns').lookup(require('os').hostname(), function (err, add, fam) {
app.listen("8080", add , function(){
console.log("The Home Server Has Started on "+ add + "! please open this link in your browser \"" + add + ":8080\" !!!" );
});
});

var app = koa();
app.proxy = true;
Expand All @@ -67,5 +67,4 @@ var IndexRouter = require('./routes');
app.use(mount('/', IndexRouter));
app.use(koaStatic(path.join(__dirname,'./public/')));

startServer(app, +argv.port);

1 change: 0 additions & 1 deletion lib/public/js/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,6 @@ FMApp.controller('FileManagerCtr', ['$scope', '$http', '$location',
console.log('rename target', target);
httpRequest('PUT', url, {type: 'RENAME'}, {target: target});
};

FM.createFolder = function (folderName) {
var url = 'api' + FM.curFolderPath + encodeURI(folderName);
httpRequest('POST', url, {type: 'CREATE_FOLDER'}, null);
Expand Down
Loading