docvy-server v0.1.0
docvy-server
The Docvy Server
table of contents:
installation:
Using npm:
⇒ npm install docvy-serverusage:
This component may be used programmatically, as in the docvy application, or from the terminal as a stand-alone application.
terminal usage:
Help information for terminal usage:
⇒ docvy-server
docvy-server: The Docvy Server
H, help show this help information
V, version show version information
s, start start server
t, status show status of server
x, stop stop server
See https://github.com/docvy/app for feature requests and bug reportsStarting application:
⇒ docvy-server start --port=9432 --attachEnabling debug output:
⇒ docvy-server start --debugprogrammatic usage:
var server = require("docvy-server");server.start([options , callback])
options(Object):port(Number): port to start server on
callback(Function):- On success, called with no arguments passed
- On failure, called with an error object passed
server.stop(callback)
callback(Function): called once the server has stopped receiving new connections. Note that the existing connections will be serviced till completion.
API:
URL endpoints to use after starting server:
- browsing directories
- reading files
- serving plugin content
- listing installed plugins
- installing new plugins
- uninstalling plugins
- graceful shutdown
Browsing directories:
GET /files/See query parameters.
Reading files:
GET /file/See query parameters.
Also:
expects(ArrayString): array of content-type to return the data in
Success Response [Schema Reference]:
{
"type": "<MIME>",
"data": "<content-of-file-after-conversion>"
}Serving Plugin Content:
GET /plugins/www/:pluginNamePath Parameters:
pluginName: name of plugin
This serves the files packaged in the plugin from the root directory (of the plugin).
Listing installed plugins:
GET /plugins/list/Success Response [Schema Reference]:
{
"plugins": [
{
"name": "<pluginName>",
"version": "<pluginVersion>",
"icon": "<URL-to-plugin-icon"
}
]
}Installing new plugins:
POST /plugins/install/:pluginNamePath Parameters:
pluginName: name of plugin
Success Response [Schema Reference]:
{
"installed": "<pluginName>"
}Uninstalling plugins:
DELETE /plugins/uninstall/:pluginNamePath Parameters:
pluginName: name of plugin
Success Response [Schema Reference]:
{
"uninstalled": "<pluginName>"
}Graceful Shutdown of Server:
DELETE /stop/Success Response [Schema Reference]:
{
"message": "acknowledged"
}license:
The MIT License (MIT)
Copyright (c) 2015 Forfuture LLC we@forfuture.co.ke Copyright (c) 2015 GochoMugo mugo@forfuture.co.ke