Golang Daily News browsing and retrieval platform based on GO+VUE implementation

Source: Internet
Author: User
This is a creation in Article, where the information may have evolved or changed.

Introduced

Gonews is an go+vue implementation-based Golang Daily news browsing and retrieval platform

    • Project Address: Github
    • On-line Demo:gonews
    • Data Source: GOCN Daily News

Project

Deployment

    • Get News data
git clone https://github.com/gocn/news /data/news
    • Get Source code
go get -u github.com/mikemintang/gonews
    • Parsing data
    • Launch API
nohup gonews -a api -p 8017 > /data/log/gonews.log 2>&1 &
    • Front-end deployment
cd $GOPATH/src/github.com/mikemintang/gonews/webnpm installnpm run build
    • Nginx Configuration
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 Script
#!/bin/shcd /data/newsgit pull origin masternohup gonews -d /data/news/ > /data/log/gonews.log 2>&1
    • Scheduled Tasks
crontab -e*/10 * * * * /bin/sh /data/shell/cache_news.sh

The technology used

Golang Bag

    • Github.com/go-redis/redis
    • Encoding/json
    • Flag
    • Net/http
    • Net/url
    • StrConv
    • Sync
    • Crypto/md5
    • Fmt
    • Io
    • Io/ioutil
    • Net/url
    • Os
    • Path/filepath
    • Regexp
    • StrConv
    • Strings
    • Time

NPM Package

    • Vue
    • Vuex
    • Vue-router
    • Axios
    • Moment
    • Mockjs

Welcome to submit Pull Request

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.