Giter VIP home page Giter VIP logo

markdown-doc-server's Introduction

markdown文档服务器(Java应用)

这是啥?

一款用于展示markdown文档的轻量级Java应用,适用于公司用作接口文档的管理。

  • 未使用任何框架。采用纯servlet、filter实现
  • 支持按不同模块管理访问者权限
  • [非必]配合linux服务器+git(markdown文档存放在某个git服务器上)可无需登录linux服务器更新文档

如何使用?

  • 修改User.java中的SYS_USER_TOKENSYS_PASSWORD_TOKEN[如果懒的弄,也可以不改,安全起见改掉:) ]
  • 将编译好的程序部署到Java应用服务器上(Tomcat、Jetty等)
  • 修改config.properties配置文件中的 文档根目录
    • 文档根目录 将存放所有按模块分类的文档(仅n个目录,目录名为模块名),并非直接存放md文件(建议直接在此用git clone一个markdown的文档项目)。
    • 模块是指:公司可能存在多个项目文档,每个项目文档应该是一个模块
  • 文档跟目录 中创建一个目录,假设名为:xyz;里面随便写一个md文件,假设为hello.md(注意:只能以md结尾)
  • 修改users.properties配置文件,配置用户权限
    • 说明1:登录名=密码:/模块1权限,/模块2权限登录名=密码:*
    • 说明2:=号左边为登录名;右边为密码和此用户可访问的文档模块权限,密码与权限之间用:分隔,权限与权限之间用,分隔,权限以/开头
    • 为刚才的xyz目录添加权限:在users.properties文件中添加一行
  • 启动应用,访问http://xxx.xxx.xxx:8080/xyz/hello.md

如何更新文档?

  • 如果采用的是linux服务器,并且上述步骤中是直接 文档根目录 中clone的目录,可以直接访问http://xxx.xxx.xxx/update.do?api=/xyz来更新(即pull)markdown文档项目
  • 如果未采用linux服务器,或没有使用git。只能手动修改 文档根目录 中的文档了 ^_^。大神如果有兴趣,欢迎优化代码!

其他的大家摸索吧!:)

markdown-doc-server's People

Contributors

sunzsh avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.