mdoc

command module
v0.0.0-...-5be9e78 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 16, 2021 License: MIT Imports: 16 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

Online server tool to made markdown document.

Run

No authentication

go build
./mdoc daemon --auth-mode=false
# Then open http://localhost:8080 in browser.

Authentication(Default mode)

go build
./mdoc daemon --auth-mode=true
# Then open http://localhost:8080 in browser.  

Set a admin account for login

Open another console, add a user to sqlite db.
The default password is 'hello', see TestHashPasswd

sudo apt-get install sqlite3
sqlite3 ./data/mdoc.db
INSERT INTO user_info(id,`passwd`,nick_name,kind,memo)VALUES('admin','7628d9fbecd3683d02276b6176b0ee13','admin',1,'system init');
.q

# modify the passwd
./mdoc user --url=http://localhost:8080 --admin-user=admin --admin-pwd=hello reset --username=admin --passwd=<newpasswd>

# add a new user
./mdoc user --url=http://localhost:8080 --admin-user=admin --admin-pwd=<newpasswd> add --username=newone --passwd=<newpasswd>

For release

go build
sudo mkdir /mnt/data/markdown
sudo cp mdoc /usr/local/bin
sudo cp -r public /mnt/data/markdown
mdoc --repo=/mnt/data/markdown daemon --listen=:8080

Hybrid authentication

Using "repo/.authignore" can do hybrid authentication.

Example in the .authignore file of demo will be ignore authentication:

/*.html
/*.js
/*.js.map
/js
/*.css
/css
/robot.txt
/markdown/README.md
/markdown/doc

BUG:

User need to login again by the opaque was changed when the server has been restart, maybe use redis to fixed this problem.

More help run "./mdoc --help"

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
tools

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL