soyuka / explorer Goto Github PK
View Code? Open in Web Editor NEWExplore and share. Highly-configurable directory listing made with nodejs.
Home Page: http://soyuka.github.io/explorer/
License: MIT License
Explore and share. Highly-configurable directory listing made with nodejs.
Home Page: http://soyuka.github.io/explorer/
License: MIT License
When I try to use explorer, I see a site with missing CSS and JS.
This is the resulting console-output on the login-page and first logged-in-page:
node --harmony index.js
Db loaded
HTTP listening on 4859
# login
GET / 302 56 - 11.328 ms
GET /login 200 2042 - 15.999 ms
2015-11-20 04:40:30 401 - Not authenticated
GET /css/app.min.css 302 28 - 3.580 ms
2015-11-20 04:40:30 401 - Not authenticated
GET /js/main.min.js 302 28 - 3.284 ms
GET /favicon-32x32.png 200 332 - 4.488 ms
GET /favicon-16x16.png 200 217 - 4.715 ms
GET /login 200 2102 - 2.425 ms
GET /logo.png 200 3471 - 4.034 ms
GET /favicon-16x16.png 304 - - 2.028 ms
GET /favicon-32x32.png 304 - - 0.945 ms
GET /login 200 2042 - 3.010 ms
# logged in
POST /login 302 46 - 50.734 ms
GET / 200 17025 - 496.154 ms
GET /favicon-32x32.png 304 - - 1.296 ms
GET /favicon-16x16.png 304 - - 0.915 ms
GET /css/app.min.css 404 528 - 6.970 ms
GET /js/main.min.js 404 528 - 5.830 ms
GET /favicon-32x32.png 304 - - 1.729 ms
GET /favicon-16x16.png 304 - - 1.525 ms
GET /js/main.min.js 404 528 - 1.378 ms
Additional Information:
I used the Git method to install explorer on Ubuntu 14.04 with NodeJS v5.1.0 and I'm using the config.example.min.yml
.
After sudo npm install
I get this warning:
npm WARN lifecycle [email protected]~postinstall: cannot run in wd %s %s (wd=%s) [email protected] bash scripts/postinstall.sh /home/vadammt/explorer
Disclaimer: I am not a user of this package, this was found during mass npm package downloading.
Atm, your npm package [email protected]
has packaged size 45.8 MiB, and installed size 130.1 MiB.
122.4 MiB of that is consumed by files v2.2.8.tar.gz
and v2.2.9.tar.gz
.
I suspect that those files were accidently packaged.
You could add them to .npmignore
(if you have an .npmignore
already) or to .gitignore
(if you don't have an .npmignore
).
Your current package files (as of [email protected]
):
xplorer-2.2.9.tgz/
├── bin
│ ├── explorer
│ └── help
├── bower.json
├── Changelog.md
├── client
│ ├── css
│ │ ├── app.css
│ │ └── app.min.css
│ ├── favicon-16x16.png
│ ├── favicon-32x32.png
│ ├── favicon.ico
│ ├── font
│ │ ├── config.json
│ │ ├── fontello.eot
│ │ ├── fontello.svg
│ │ ├── fontello.ttf
│ │ └── fontello.woff
│ ├── logo.png
│ └── scss
│ ├── fontello.scss
│ ├── normalize.scss
│ ├── _settings.scss
│ └── style.scss
├── dist
│ ├── index.js
│ ├── lib
│ │ ├── config.js
│ │ ├── HTTPError.js
│ │ ├── job
│ │ │ ├── container.js
│ │ │ ├── interactor.js
│ │ │ ├── job.js
│ │ │ ├── memory.js
│ │ │ └── stat.js
│ │ ├── nativeSearch.js
│ │ ├── plugins.js
│ │ ├── search.js
│ │ ├── sort.js
│ │ ├── tree.js
│ │ ├── userSchema.js
│ │ ├── users.js
│ │ └── utils.js
│ ├── middlewares
│ │ ├── error.js
│ │ ├── format.js
│ │ ├── index.js
│ │ ├── notify.js
│ │ ├── optionsCookie.js
│ │ ├── prepareTree.js
│ │ ├── registerHooks.js
│ │ ├── trashSize.js
│ │ └── user.js
│ ├── plugins
│ │ ├── archive
│ │ │ ├── hooks.js
│ │ │ ├── index.js
│ │ │ ├── job.js
│ │ │ └── router.js
│ │ └── upload
│ │ ├── hooks.js
│ │ ├── index.js
│ │ ├── job.js
│ │ └── router.js
│ ├── routes
│ │ ├── admin.js
│ │ ├── index.js
│ │ ├── rss.js
│ │ ├── settings.js
│ │ ├── tree.js
│ │ └── user.js
│ └── server.js
├── doc
│ ├── examples
│ │ ├── certs
│ │ │ ├── cert.pem
│ │ │ └── key.pem
│ │ ├── config.example.dev.yml
│ │ ├── config.example.min.yml
│ │ └── data
│ │ └── users
│ ├── Migration.md
│ ├── Plugins.md
│ └── screen.png
├── gulpfile.js
├── index.js
├── lib
│ ├── config.js
│ ├── HTTPError.js
│ ├── job
│ │ ├── container.js
│ │ ├── interactor.js
│ │ ├── job.js
│ │ ├── memory.js
│ │ └── stat.js
│ ├── nativeSearch.js
│ ├── plugins.js
│ ├── search.js
│ ├── sort.js
│ ├── tree.js
│ ├── userSchema.js
│ ├── users.js
│ └── utils.js
├── LICENSE
├── middlewares
│ ├── error.js
│ ├── format.js
│ ├── index.js
│ ├── notify.js
│ ├── optionsCookie.js
│ ├── prepareTree.js
│ ├── registerHooks.js
│ ├── trashSize.js
│ └── user.js
├── package.json
├── plugins
│ ├── archive
│ │ ├── hooks.js
│ │ ├── index.js
│ │ ├── job.js
│ │ └── router.js
│ └── upload
│ ├── hooks.js
│ ├── index.js
│ ├── job.js
│ ├── router.js
│ └── views
│ └── upload.haml
├── README.md
├── routes
│ ├── admin.js
│ ├── index.js
│ ├── rss.js
│ ├── settings.js
│ ├── tree.js
│ └── user.js
├── scripts
│ ├── deploy.sh
│ └── postinstall.sh
├── server.js
├── src
│ ├── index.js
│ ├── lib
│ │ ├── config.js
│ │ ├── HTTPError.js
│ │ ├── job
│ │ │ ├── container.js
│ │ │ ├── interactor.js
│ │ │ ├── job.js
│ │ │ ├── memory.js
│ │ │ └── stat.js
│ │ ├── nativeSearch.js
│ │ ├── plugins.js
│ │ ├── search.js
│ │ ├── sort.js
│ │ ├── tree.js
│ │ ├── userSchema.js
│ │ ├── users.js
│ │ └── utils.js
│ ├── middlewares
│ │ ├── error.js
│ │ ├── format.js
│ │ ├── index.js
│ │ ├── notify.js
│ │ ├── optionsCookie.js
│ │ ├── prepareTree.js
│ │ ├── registerHooks.js
│ │ ├── trashSize.js
│ │ └── user.js
│ ├── plugins
│ │ ├── archive
│ │ │ ├── hooks.js
│ │ │ ├── index.js
│ │ │ ├── job.js
│ │ │ └── router.js
│ │ └── upload
│ │ ├── hooks.js
│ │ ├── index.js
│ │ ├── job.js
│ │ └── router.js
│ ├── routes
│ │ ├── admin.js
│ │ ├── index.js
│ │ ├── rss.js
│ │ ├── settings.js
│ │ ├── tree.js
│ │ └── user.js
│ └── server.js
├── test
│ ├── api
│ │ ├── admin.js
│ │ ├── archive.js
│ │ ├── format.js
│ │ ├── login.js
│ │ ├── search.js
│ │ ├── tree.js
│ │ ├── upload.js
│ │ └── user.js
│ ├── bootstrap.js
│ ├── fixtures
│ │ ├── testjob
│ │ │ ├── index.js
│ │ │ └── job.js
│ │ ├── trash
│ │ ├── tree
│ │ │ ├── dir
│ │ │ │ ├── 1Mo.dat
│ │ │ │ └── someotherfile
│ │ │ ├── dir2
│ │ │ │ └── 2Mo.dat
│ │ │ ├── dir3
│ │ │ │ ├── 2Mo.dat
│ │ │ │ └── dir
│ │ │ │ └── 2Mo.dat
│ │ │ ├── dirfile
│ │ │ ├── dummy.txt
│ │ │ ├── favicon.ico
│ │ │ ├── lowerCamelCase
│ │ │ ├── '[special,]
│ │ │ └── tobedeleted
│ │ └── users
│ ├── index.js
│ ├── job
│ │ ├── interactor.js
│ │ ├── memory.js
│ │ └── stat.js
│ ├── lib
│ │ ├── nativeSearch.js
│ │ ├── search.js
│ │ ├── tree.js
│ │ ├── users.js
│ │ └── utils.js
│ └── supertest.js
├── v2.2.8.tar.gz
├── v2.2.9.tar.gz
└── views
├── admin
│ └── user
│ ├── create.haml
│ └── update.haml
├── admin.haml
├── index.haml
├── login.haml
├── notifications.haml
├── settings.haml
└── tree.haml
50 directories, 196 files
Glob patters to remove some directories/files by user:
- $user:
- '/home/shared/'
- '!/home/shared/p0rn'
Is it possible to set a user to auto login?
I'm going to proxy this behind another webserver that does the https and auth for me already. No need to ask the user to log in again (and maintain a separate auth system)
next(err)
When I try to install from sourcecode,log:
I don't know where to change the download address.(I checked the release page.It do not contain 3.13.1)
log:
Downloading binary from https://github.com/sass/node-sass/releases/download/v3.13.1/android-arm64-57_binding.node
Cannot download "https://github.com/sass/node-sass/releases/download/v3.13.1/android-arm64-57_binding.node":
HTTP error 404 Not Found
Hint: If github.com is not accessible in your location
try setting a proxy via HTTP_PROXY, e.g.
export HTTP_PROXY=http://example.com:1234
or configure npm proxy via
npm config set proxy http://example.com:8080
Hi I use your nice piece of software to expose backup directories made from ZFS snapshots.
This issue is like a config tips.
After hours of searching I finnaly found that the issue was the calculation of directory size which is false when there is more than 10 directory levels
To get rid of the slow browsing just edit .config/explorer/config.yml with maxDeph:1
tree:
# When calculating directory size we stop at the max_depth
maxDepth: 1 #Default 10
Maybe this setting could became default ?
Thanks again for your work I love that explorer :)
I'm having trouble getting this to run under a subdirectory/url like example.com/files
. It seems to work for the most part, but not all the url's in explorer respect the app_root
setting. Some point to example.com/download
rather than example.com/files/download
My nginx config is:
location /files {
return 301 https://$server_name/files/;
}
location /files/ {
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_pass http://explorer/;
}
Hi !
I follow the install guide but i'm having troubles btw look awsome :D
After installing nodejs 4.4.2 and pm2, I install explorer, after it's done it won't start and crashed immediately here's logs:
http://pastebin.com/mAm8WC5g // pm2/logs/xplorer-error-0.log
http://pastebin.com/scssejE1 // pm2/logs/xplorer-out-0.log
btw i don't know why it's not creating conf file in the directory and even if i create one it'll crash..
http://pastebin.com/tXi0hcd6 // installation + "pm2 show" after explorer's installation
And also I'm new to nodejs and all that stuff don't be harsh with me :)
Best regards,
PS: Es-tu français, j'ai vu ton nom quelque part je crois ? Merci
Deleting from trash should force 'rm'
Disable confirm messages if method is 'mv'
Change plugins location to ~/.config/explorer/plugins
? Or check conf to download plugins on restart
I mount my config.yml in the docker-compose file but Explorer don't use it ... How can i do ?
explorer:
restart: always
container_name: explorer
image: explorer
volumes:
- /home/user/dockers/explorer/docker/config/config.yml:/opt/explorer
- /home/user/dockers/explorer/docker/config/users:/users
- /home/user/dockers/explorer/docker/data/archive:/archive
- /home/user/dockers/explorer/docker/data/trash:/trash
- /home/user/dockers/explorer/docker/data/upload:/upload
- /home/user/data:/data
ports:
- 7745:4859
environment:
- VIRTUAL_HOST=domain.tld
- LETSENCRYPT_HOST=domain.tld
- [email protected]
A suggestion :
For use with reverse proxy like nginx.
And use the http auth of nginx with the header ?
Description
I just tried about an hour to install it on my server, (which already runs other node 14 applications).
I first tried to run it in a docker, which didn't work.
Then I decided to just clone the git repo and install it.
Then I went through a range of different issues:
Issues with bcrypt, issues with node-sass, issues with gulp versions
So, in the end, I had to give up.
i run the project and i found this warning and i see a site with missing CSS and JS.
First part of this I figured out on my own. In lib/searc/index.js
line 55 needs to be:
if(!options || !options.command) {
because options
is config.search
and so options.search
is undefined and you never get to use a custom command!
Second part I can't figure out. I have a dummy search program that prints "./output.pdf" to console rigth now but I can't get it to work. Error is: Path must be a string. Received [ '/output.pdf' ]
. Full output below
Sorry if the line numbers don't up - I added some debug lines on my own trying to figure this out. I'm new to node.js so...thanks for being helpful and patient with me!
explorer:search Data [ '/output.pdf' ] +28ms
explorer:tree Tree for path /output.pdf and options { search: '', sort: '', order: 'asc', page: 1, root: '/nas', path: '/nas', parent: '/nas', buildUrl: [Function: buildUrl], extend: [Function: extend], urlOptions: { limit: undefined, order: 'asc'
, sort: undefined, page: 1 }, hooks: { upload: { menu: [Function: menu] }, archive: { action: [Function: action] }, move: { action: [Function: action], directory: [Function: directory] } }, notifications: { num: 0, move: [], archive: [], upload: []
}, user: { username: 'admin', home: '/nas', key: 'ic1XNtmjNPWyiWFQKfS0h7B5j', admin: 1, readonly: 0, ignore: '', trash: '', archive: '', upload: '', getCookie: [Function: getCookie], sanitize: [Function: sanitize], isValid: [Function: isValid], valu
eToIntegerBool: [Function: valueToIntegerBool], crypt: [Function: crypt], generateKey: [Function: generateKey], update: [Function: update], toString: [Function: toString] }, upload: { concurrency: 10, maxSize: '100mb', maxCount: 10, path: '/root/.co
nfig/explorer/upload' }, messages: { info: [], error: [] }, app_root: '/', cacheTTL: 86400, cache: { time: MemoryCache { namespace: 'tree:time' }, size: MemoryCache { namespace: 'tree:size' } }, concurrency: 100, maxDepth: 10, limit: 100, remove: {
method: 'mv', path: '/root/.config/explorer/trash' }, archive: { path: '/root/.config/explorer/tmp' }, filters: [ [Function: noDotFiles] ] } +9ms
explorer:tree paths function path:/output.pdf +1ms
explorer:tree path: /output.pdf +3ms
explorer:tree f: /output.pdf +1ms
TypeError: Path must be a string. Received [ '/output.pdf' ]
at assertPath (path.js:28:11)
at Object.join (path.js:1246:7)
at /opt/explorer/lib/tree.js:269:15
at tryCatcher (/opt/explorer/node_modules/bluebird/js/main/util.js:26:23)
at MappingPromiseArray._promiseFulfilled (/opt/explorer/node_modules/bluebird/js/main/map.js:56:38)
at MappingPromiseArray.init (/opt/explorer/node_modules/bluebird/js/main/promise_array.js:92:18)
at MappingPromiseArray.init (/opt/explorer/node_modules/bluebird/js/main/map.js:29:23)
at Async._drainQueue (/opt/explorer/node_modules/bluebird/js/main/async.js:128:12)
at Async._drainQueues (/opt/explorer/node_modules/bluebird/js/main/async.js:133:10)
at Immediate.Async.drainQueues (/opt/explorer/node_modules/bluebird/js/main/async.js:15:14)
at runCallback (timers.js:789:20)
at tryOnImmediate (timers.js:751:5)
at processImmediate [as _immediateCallback] (timers.js:722:5)
2018-01-19 22:29:41 Error: A server error occur, if this happens again please contact the administrator: Path must be a string. Received [ '/output.pdf' ]
at new HTTPError (/opt/explorer/lib/HTTPError.js:12:17)
at Spawner.<anonymous> (/opt/explorer/lib/utils.js:182:18)
at tryCatch1 (/opt/explorer/node_modules/promise-spawner/node_modules/bluebird/js/main/util.js:63:19)
at Promise$_callHandler [as _callHandler] (/opt/explorer/node_modules/promise-spawner/node_modules/bluebird/js/main/promise.js:695:13)
at Promise$_settlePromiseFromHandler [as _settlePromiseFromHandler] (/opt/explorer/node_modules/promise-spawner/node_modules/bluebird/js/main/promise.js:711:18)
at Promise$_settlePromiseAt [as _settlePromiseAt] (/opt/explorer/node_modules/promise-spawner/node_modules/bluebird/js/main/promise.js:868:14)
at Promise$_settlePromises [as _settlePromises] (/opt/explorer/node_modules/promise-spawner/node_modules/bluebird/js/main/promise.js:1006:14)
at Promise$_rejectPromises [as _rejectPromises] (/opt/explorer/node_modules/promise-spawner/node_modules/bluebird/js/main/promise.js:999:10)
at Async$_consumeFunctionBuffer [as _consumeFunctionBuffer] (/opt/explorer/node_modules/promise-spawner/node_modules/bluebird/js/main/async.js:74:12)
at Async$consumeFunctionBuffer (/opt/explorer/node_modules/promise-spawner/node_modules/bluebird/js/main/async.js:37:14)
at _combinedTickCallback (internal/process/next_tick.js:131:7)
at process._tickCallback (internal/process/next_tick.js:180:9)
GET /search?search=&path=%2Fnas 302 124.843 ms - 88
Side note: I'm working on a docker image that integrates your explorer with recoll search so that I can search inside files. I'll put it up on github soon.
Hi !
Have you stop the developpement of this project or you continue ? :s
Thx ;)
Hi,
I cannot connect as admin:admin during first connection. No clue about what is wrong...
(testing with iojs-3.3.0)
Thanks for any help.
Best regards,
jgr
I figured out that the directory order is innacurrate.
I tried with just numbers like
YYYYMMdd => 20180120
Or even with alphabetical order the folders are shown in wrong order.
Thanks for the beautiful software otherwise :)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.