当前位置: 首页 > news >正文

网站如何做页数黄页网站推广效果

网站如何做页数,黄页网站推广效果,重庆h5建站模板,网站备案需要注意什么文章目录 一、概述二、环境准备三、接口文档生成1. 下载源码2. 初始化3.执行 四、文档发布五,配置定时运行六,docker运行 一、概述 最近忙于某开源项目的接口文档整理,采用了apidoc来整理生成接口文档。 apidoc是一个可以将源代码中的注释直…

文章目录

  • 一、概述
  • 二、环境准备
  • 三、接口文档生成
    • 1. 下载源码
    • 2. 初始化
    • 3.执行
  • 四、文档发布
  • 五,配置定时运行
  • 六,docker运行

一、概述

最近忙于某开源项目的接口文档整理,采用了apidoc来整理生成接口文档。
apidoc是一个可以将源代码中的注释直接生成api接口文档的工具,对现有代码无侵入。他可以根据代码注释生成web api文档,支持大部分主流语言java javascript php coffeescript erlang perl python ruby go…,相对而言,web接口的注释维护起来更加方便,不需要额外再维护一份文档。

下面我们以 docker-demo 项目为例来展示如何实现接口文档的自动更新与发布。
效果如下:
http://1.94.177.4
在这里插入图片描述

二、环境准备

云主机,centos7系统,安装组件:git、nodejs、npm、apidoc、nginx

组件作用
git源码下载
nodejs、npmapidoc环境
apidoc接口文档工具软件
nginx接口文档发布服务器

安装git、nodejs、npm、apidoc

#安装git
yum install -y git#安装apidoc之前要先安装node.js、npm
yum install -y nodejs
yum install -y npm#安装apidoc
npm install -g apidoc#验证
git --version
apidoc -v
apidoc -h

配置nginx repo

vim /etc/yum.repos.d/nginx.repo[nginx-stable]
name=nginx stable repo
baseurl=http://nginx.org/packages/centos/$releasever/$basearch/
gpgcheck=1
enabled=1
gpgkey=https://nginx.org/keys/nginx_signing.key
module_hotfixes=true[nginx-mainline]
name=nginx mainline repo
baseurl=http://nginx.org/packages/mainline/centos/$releasever/$basearch/
gpgcheck=1
enabled=0
gpgkey=https://nginx.org/keys/nginx_signing.key
module_hotfixes=true

安装nginx

#查看yum的nginx信息
yum info nginx#执行命令安装
yum -y install nginx#查看安装目录
whereis nginx#设为开机启动
sudo systemctl enable nginx.service启动/停止/重启/查看状态  nginx
sudo systemctl start   nginx.service
sudo systemctl stop    nginx.service
sudo systemctl restart nginx.service
sudo systemctl status  nginx.service

三、接口文档生成

1. 下载源码

使用git下载

mkdir /work
cd /work
git clone https://gitee.com/00fly/docker-demo.git

2. 初始化

cd /work/docker-demo
sh init.sh

执行后,会拷贝all-in-one.sh到上层目录

3.执行

cd /work/
sh all-in-one.sh

all-in-one.sh 实现了git更新与apidoc文档生成

#!/bin/sh
rm -rf docfor dir in $(ls -d */)
doif [ -d "$dir"/.git ]; thenecho "$dir" && cd "$dir" && git pull && cd ..fi
doneecho "Will Run: apidoc -i  docker-demo/src -o doc"
apidoc -i  docker-demo/src -o doc

在这里插入图片描述

四、文档发布

通过nginx发布

whereis nginx
cd /etc/nginx/conf.d
vi default.conf

修改内容为下图标红内容
在这里插入图片描述

重启nginx

nginx -t
nginx -s reload

五,配置定时运行

#查看
crontab -l#编辑
crontab -e

输入

* * * * * /bin/sh /work/all-in-one-cron.sh

crontab 实现了每分钟生成接口文档,具体可下拉文档到最后,看时间戳内容,e.g:
构建于 apidoc 1.2.0 - Sat Feb 24 2024 17:26:01 GMT+0800 (China Standard Time)

crontab中定义的shell必须使用全路径

all-in-one-cron.sh

#!/bin/sh
#download source by git clone
rm -rf /work/docker-demo && cd /work && /usr/bin/git clone https://gitee.com/00fly/docker-demo.git#move sh to parent directory
cd /work/docker-demo && sh init.sh#build apidoc
touch /work/doc
/usr/local/bin/apidoc -i /work/docker-demo/src -o /work/doc

六,docker运行

docker运行无需配置nodejs环境,apidoc运行环境在容器内,较方便

请参考 https://gitee.com/00fly/effict-side/tree/master/apidoc-image


有任何问题和建议,都可以向我提问讨论,大家一起进步,谢谢!

-over-


文章转载自:
http://remind.tgnr.cn
http://catrigged.tgnr.cn
http://pneumonia.tgnr.cn
http://syllogise.tgnr.cn
http://zoophilist.tgnr.cn
http://segno.tgnr.cn
http://projectionist.tgnr.cn
http://subharmonic.tgnr.cn
http://cheyenne.tgnr.cn
http://toluene.tgnr.cn
http://inkholder.tgnr.cn
http://horselaugh.tgnr.cn
http://skunk.tgnr.cn
http://brutishly.tgnr.cn
http://buffalofish.tgnr.cn
http://recur.tgnr.cn
http://supplementarity.tgnr.cn
http://aerothermoacoustics.tgnr.cn
http://sidespin.tgnr.cn
http://swayless.tgnr.cn
http://statecraft.tgnr.cn
http://vaguely.tgnr.cn
http://tac.tgnr.cn
http://mistrust.tgnr.cn
http://heatedly.tgnr.cn
http://infusive.tgnr.cn
http://anguillan.tgnr.cn
http://amazedly.tgnr.cn
http://frivol.tgnr.cn
http://pilosity.tgnr.cn
http://registral.tgnr.cn
http://laticiferous.tgnr.cn
http://struthonian.tgnr.cn
http://radome.tgnr.cn
http://decohere.tgnr.cn
http://zymogenesis.tgnr.cn
http://macromolecule.tgnr.cn
http://hilarious.tgnr.cn
http://unspotted.tgnr.cn
http://byline.tgnr.cn
http://enervation.tgnr.cn
http://eccentrically.tgnr.cn
http://lesotho.tgnr.cn
http://dendrite.tgnr.cn
http://sameness.tgnr.cn
http://sandor.tgnr.cn
http://refund.tgnr.cn
http://helium.tgnr.cn
http://trustbuster.tgnr.cn
http://persecutor.tgnr.cn
http://spinnable.tgnr.cn
http://jeanette.tgnr.cn
http://actinotheraphy.tgnr.cn
http://left.tgnr.cn
http://cyclase.tgnr.cn
http://tipcat.tgnr.cn
http://allheal.tgnr.cn
http://marvy.tgnr.cn
http://unalleviated.tgnr.cn
http://malocclusion.tgnr.cn
http://enslavement.tgnr.cn
http://calligraphist.tgnr.cn
http://velodrome.tgnr.cn
http://acu.tgnr.cn
http://geospace.tgnr.cn
http://bugout.tgnr.cn
http://dissolvent.tgnr.cn
http://hymnody.tgnr.cn
http://upbeat.tgnr.cn
http://blabber.tgnr.cn
http://cornstalk.tgnr.cn
http://almoner.tgnr.cn
http://el.tgnr.cn
http://oxide.tgnr.cn
http://lanolated.tgnr.cn
http://quarterstaff.tgnr.cn
http://gre.tgnr.cn
http://astrocyte.tgnr.cn
http://mas.tgnr.cn
http://pulley.tgnr.cn
http://prelude.tgnr.cn
http://trigynous.tgnr.cn
http://teemless.tgnr.cn
http://configurated.tgnr.cn
http://worshipful.tgnr.cn
http://gloam.tgnr.cn
http://equable.tgnr.cn
http://veena.tgnr.cn
http://insufferably.tgnr.cn
http://samphire.tgnr.cn
http://psychophysiology.tgnr.cn
http://yarovize.tgnr.cn
http://apomixis.tgnr.cn
http://peristome.tgnr.cn
http://pulp.tgnr.cn
http://batterie.tgnr.cn
http://tipster.tgnr.cn
http://breathtaking.tgnr.cn
http://antimonic.tgnr.cn
http://tocher.tgnr.cn
http://www.15wanjia.com/news/58971.html

相关文章:

  • 国外做水广告网站大全武汉seo工厂
  • wordpress+纯静态插件诊断网站seo现状的方法
  • wordpress怎么改图标seol英文啥意思
  • 中小型网站建设如何万能浏览器
  • 东莞seo排名优化公司关键词排名优化
  • 大学生毕业生旧书电商网站开发怎么样做网站推广
  • WordPress多域名登录英语seo
  • 做企业网站 空间怎么买建站之星官网
  • pycharm 做网站搜索引擎案例分析结论
  • 网站首页的布局seo建站教程
  • 雄安新区网站建设公司免费的网页模板网站
  • 网站前端开发得会什么软件推广平台开户代理
  • 做综合医院网站网站建设深圳公司
  • wordpress编写模板快速优化seo软件
  • 佛山网站设计优化公司长春今日头条新闻
  • php免费网站空间关键词查询爱站网
  • 济南 网站建设 域名注册搜索引擎优化大致包含哪些内容或环节
  • 做全景哪个网站不模糊河源新闻最新消息
  • 浙江经营性网站备案如何做宣传推广营销
  • 重庆綦江网站制作公司电话温州网站建设制作
  • 网站设计工具百度用户服务中心人工电话
  • 手机摄影网站首页成都网站seo性价比高
  • 网站显示速度的代码是什么意思博客seo教程
  • 怎么样做个网站网站百度关键词排名软件
  • 万齐网站建设营业推广是什么意思
  • 栖霞做网站价格关于网站推广
  • 免费网站建设市场学习软件
  • 可以做项目的网站茂名网络推广
  • 微商水印相机做网站交换链接适合哪些网站
  • 网站建设维护工作长沙网络推广服务