File storage engine through multiple storage drivers
1.0K
NexusDocs server application
User Documentation
npm install nexushubs-server
git clone https://github.com/nexushubs/nexusdocs.git
cd packages/nexusdocs-server
npm install
./ndstool install
./ndstool client create-url user
npm start
const createServer = require('nexusdocs-server');
const server = createServer({
hostname: '<hostname>', // default 127.0.0.1
port: '<port>', // default 4000
database: '<mongo-url>', // default mongodb://127.0.0.1/nexusdocs
});
server.start();
server {
listen 80;
server_name storage.example.com;
#...
location /api/nexusdocs {
proxy_set_header Host $host;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Scheme $scheme;
proxy_set_header X-Original-URI $request_uri;
proxy_pass http://127.0.0.1:4000/api;
proxy_http_version 1.1;
}
#...
}
| Env | Description |
|---|---|
NDS_DATABASE | Mongodb database URL |
NDS_RESTFUL_ENABLED | Whether to start API Server |
NDS_RESTFUL_HOSTNAME | API Server bind hostname |
NDS_RESTFUL_PORT | API Server bind port |
NDS_RESTFUL_TRUSTED_PROXY | Trusted Proxy, see http://expressjs.com/en/4x/api.html#trust.proxy.options.table |
NDS_RESTFUL_SERVER_URL | Custom server url, default to '' |
NDS_DEBUG_REQUEST | Switch whether to debug HTTP requests |
$ ./ndstool --help
Usage: ndstool [options] [command]
Options:
-V, --version output the version number
-h, --help output usage information
Commands:
install install default data
env manage .env config
provider [command] manage provider
namespace [command] namespace provider
client [command] client manage
help [cmd] display help for [cmd]
The build-in docker-compose.yml starts 3 containers:
unoconv for converting office documentmongo build-in mongodb server, you can replace to your ownnds NexusDocs server, with full run-time code$ docker-compose up -d
Creating nexusdocsserver_unoconv_1 ... done
Creating nexusdocsserver_mongo_1 ... done
Creating nexusdocsserver_nds_1 ... done
$ docker-compose exec nds /bin/sh
/usr/src/app # ndstool install
$ docker-compose logs --follow nds
MIT
Content type
Image
Digest
Size
156.8 MB
Last updated
about 6 years ago
docker pull nexushubs/nexusdocs