‚̧Natively Pluggable Module
    Have ideas to improve npm?Join in the discussion! ¬Ľ

    docvy-server

    0.1.0¬†‚Äʬ†Public¬†‚Äʬ†Published

    docvy-server

    The Docvy Server

    node npm Travis Gemnasium Coveralls

    table of contents:

    installation:

    Using npm:

    ⇒ npm install docvy-server

    usage:

    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 reports

    Starting application:

    ⇒ docvy-server start --port=9432 --attach

    Enabling debug output:

    ⇒ docvy-server start --debug

    programmatic 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:

    GET /files/

    See query parameters.

    Reading files:

    GET /file/

    See query parameters.

    Also:

    • expects (Array[String]): 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/:pluginName

    Path 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/:pluginName

    Path Parameters:

    • pluginName: name of plugin

    Success Response [Schema Reference]:

    {
      "installed": "<pluginName>"
    }

    Uninstalling plugins:

    DELETE /plugins/uninstall/:pluginName

    Path 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

    Keywords

    Install

    npm i docvy-server

    DownloadsWeekly Downloads

    0

    Version

    0.1.0

    License

    MIT

    Last publish

    Collaborators

    • avatar
    • avatar