Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

docs-server

Package Overview
Dependencies
Maintainers
1
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

docs-server

A server which is used to build one of microservices for docs system

  • 1.0.1
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1
decreased by-95.24%
Maintainers
1
Weekly downloads
 
Created
Source

Docs-server npm CircleCI node

A server which is used to build a kind of microservices for docs system.

Feature

  • Perform automatic markdown searching and generate correct dynamic routes according to the root path of your project.

  • Support multiple-level documentation routes.

  • Support for specifying additional static resources routes.

Usage

  • Simple running
const DocsServer = require('docs-server')

// It should be running at http://localhost:8800 by default
const app = new DocsServer()

or

const DocsServer = require('docs-server')()
  • ( Optional ) You can specify your custom configuration.
const resolve = require('path').resolve
const DocsServer = require('docs-server')

// Notice: all options is optional
const app = new DocsServer({
  // should be nodejs current working directory
  cwd: resolve('./'),

  // the output path of catalog files (based on current working directory)
  dest: resolve('./menu.json'),

  // your server running port
  port: '8800',

  // extra static resource routes
  extra: [
    {
      route: '/test', // eg. http://locahost:8800/test
      middleware: async (ctx, next) => {
        // do something
      }
    }
  ]
})
  • Test you building
# test your server
curl -v http://localhost:8800  # response from /
curl -v http://localhost:8800/doc/sample # response from /doc/sample

CHANGELOG

CHANGELOG

Keywords

FAQs

Package last updated on 05 Aug 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc