File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -143,13 +143,13 @@ npm i -g @doocs/md-cli
143143md-cli
144144
145145# 访问
146- open http://127.0.0.1:8800/md/
146+ open http://127.0.0.1:8800
147147
148148# 启动并指定端口
149149md-cli port=8899
150150
151151# 访问
152- open http://127.0.0.1:8899/md/
152+ open http://127.0.0.1:8899
153153```
154154
155155md-cli 支持以下命令行参数:
Original file line number Diff line number Diff line change @@ -29,7 +29,7 @@ async function startServer() {
2929
3030 app . listen ( port , '127.0.0.1' , ( ) => {
3131 console . log ( `服务已启动:` )
32- console . log ( `打开链接 ${ colors . green ( `http://127.0.0.1:${ port } /md/ ` ) } 即刻使用吧~` )
32+ console . log ( `打开链接 ${ colors . green ( `http://127.0.0.1:${ port } ` ) } 即刻使用吧~` )
3333 console . log ( `` )
3434
3535 const { spaceId, clientSecret } = arg
Original file line number Diff line number Diff line change 11{
22 "name" : " @doocs/md-cli" ,
3- "version" : " 2.1.1 " ,
3+ "version" : " 2.1.2 " ,
44 "type" : " module" ,
55 "description" : " WeChat Markdown Editor | 一款高度简洁的微信 Markdown 编辑器:支持 Markdown 语法、自定义主题样式、内容管理、多图床、AI 助手等特性" ,
66 "main" : " index.js" ,
Original file line number Diff line number Diff line change @@ -88,17 +88,10 @@ export function createServer(port = 8800) {
8888 }
8989 } )
9090
91- app . get ( '/' , ( _ , res ) => {
92- res . redirect ( '/md/' )
93- } )
94-
9591 console . log ( '代理到: https://md.doocs.org/' )
96- app . use ( '/md/' , createProxyMiddleware ( {
92+ app . use ( createProxyMiddleware ( {
9793 target : 'https://md.doocs.org/' ,
9894 changeOrigin : true ,
99- pathRewrite : {
100- '^/md/' : '' ,
101- } ,
10295 on : {
10396 error : ( err , req , res ) => {
10497 console . error ( `代理错误 ${ req . path } :` , err )
You can’t perform that action at this time.
0 commit comments