Giter Site home page Giter Site logo

gonews's Introduction

GoNews -- Golang每日新闻可视化浏览与检索平台

介绍

gonews是基于go+vue实现的golang每日新闻浏览与检索平台

项目截图

gonews

部署

  • 获取新闻数据
git clone https://github.com/gocn/news /data/news
  • 获取源码
go get -u github.com/idoubi/gonews
  • 启动后台服务,拉取、解析数据
nohup gonews -d /data/news > /data/log/gonews.log 2>&1 

可选参数:-pull ,拉取数据源的时间间隔,单位分钟,默认值60

  • 启动Api
nohup gonews -a api -p 8017 > /data/log/gonews.log 2>&1 &
  • 前端部署
cd $GOPATH/src/github.com/idoubi/gonews/web
npm install
npm run build
  • Nginx配置
server {
    listen       80;
    server_name gonews.cc;
    index index.html index.htm index.php;
    root  /data/go/src/idoubi/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;
    }
}

用到的技术

golang包

  • 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包

  • vue
  • vuex
  • vue-router
  • axios
  • moment
  • mockjs

欢迎提交Pull Request

gonews's People

Contributors

idoubi avatar ng1091 avatar dependabot[bot] avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.