Docs-server
![node](https://img.shields.io/node/v/docs-server.svg)
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
const DocsServer = require('docs-server')
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')
const app = new DocsServer({
cwd: resolve('./'),
dest: resolve('./menu.json'),
port: '8800',
extra: [
{
route: '/test',
middleware: async (ctx, next) => {
}
}
]
})
# test your server
curl -v http://localhost:8800 # response from /
curl -v http://localhost:8800/doc/sample # response from /doc/sample
CHANGELOG
CHANGELOG