gonews 是基于go+vue
实现的 golang 每日新闻浏览与检索平台
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
nohup gonews -a api -p 8017 > /data/log/gonews.log 2>&1 &
cd $GOPATH/src/github.com/mikemintang/gonews/web
npm install
npm run build
server {
listen 80;
server_name gonews.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;
}
location /news {
rewrite ^.+news/?(.*)$ /$1 break;
proxy_pass http://gonews.cc;
}
}
#!/bin/sh
cd /data/news
git pull origin master
crontab -e
*/1 * * * * /bin/sh /data/shell/cache_news.sh
*/2 * * * * nohup gonews -d /data/news/ > /data/log/gonews.log 2>&1
欢迎提交 Pull Request