基于go+vue实现的golang每日新闻数据浏览与检索平台(推荐)
Go  /  管理员 发布于 3年前   216
gonews是基于 go+vue 实现的golang每日新闻浏览与检索平台
项目地址: Github
线上Demo:GoNews
数据来源: GoCN每日新闻
项目截图
部署
获取新闻数据
git clone https://github.com/gocn/news /data/news
获取源码
go get -u github.com/mikemintang/gonews
解析数据
nohup gonews -d /data/news > /data/log/gonews.log 2>&1
启动Api
nohup gonews -a api -p 8017 > /data/log/gonews.log 2>&1 &
前端部署
cd $GOPATH/src/github.com/mikemintang/gonews/webnpm installnpm run build
Nginx配置
server { listen 80; server_name gonews.idoubi.cc; index index.html index.htm index.php; root /data/go/src/mikemintang/gonews/web; location /api { rewrite ^.+api/?(.*)$ /$1 break; proxy_pass http://127.0.0.1:8017; }}
Shell脚本
#!/bin/shcd /data/newsgit pull origin masternohup gonews -d /data/news/ > /data/log/gonews.log 2>&1
定时任务
crontab -e*/10 * * * * /bin/sh /data/shell/cache_news.sh
用到的技术
golang包
github.com/go-redis/redisencoding/jsonflagnet/httpnet/urlstrconvsynccrypto/md5fmtioio/ioutilnet/urlospath/filepathregexpstrconvstringstime
总结
以上所述是小编给大家介绍的基于go+vue实现的golang每日新闻数据浏览与检索平台,希望对大家有所帮助,如果大家有任何疑问请给我留言,小编会及时回复大家的。在此也非常感谢大家对站的支持!
路人 在
php中使用hyperf框架调用讯飞星火大模型实现国内版chatgpt功能示例中评论 教程很详细,如果加个前端chatgpt对话页面就完美了..博主 在
科学上网翻墙之v2rayN-Core客户端免费公益节点使用教程中评论 @ mashrdn 多切换几个节点测试,免费ssr是没那么稳..mashrdn 在
科学上网翻墙之v2rayN-Core客户端免费公益节点使用教程中评论 V2rayn免费节点添加上去了,youtobe无法打开网页,是怎么回事..张伟 在
科学上网翻墙之v2rayN-Core客户端免费公益节点使用教程中评论 3q!有用,不过免费节点隔天就要去git上复制新的导进去..博主 在
科学上网翻墙访问Google , 上外网神器佛跳墙VPN(永久免费)使用流程步骤中评论 该篇教程已不能用了,告知大家,免的老有老铁问我!..
Copyright·© 2019 侯体宗版权所有·
粤ICP备20027696号