All Projects → ethan-funny → React News Board

ethan-funny / React News Board

Licence: gpl-2.0
🌀 A Full-Stack Web App built with React and Flask.

Projects that are alternatives of or similar to React News Board

Livetv mining
直播网站数据采集
Stars: ✭ 188 (-51.67%)
Mutual labels:  webpack, flask
Cookiecutter Flask
A flask template with Bootstrap 4, asset bundling+minification with webpack, starter templates, and registration/authentication. For use with cookiecutter.
Stars: ✭ 3,967 (+919.79%)
Mutual labels:  webpack, flask
Flask Vuejs Madblog
基于 Flask 和 Vue.js 前后端分离的微型博客项目,支持多用户、Markdown文章(喜欢/收藏文章)、粉丝关注、用户评论(点赞)、动态通知、站内私信、黑名单、邮件支持、管理后台、权限管理、RQ任务队列、Elasticsearch全文搜索、Linux VPS部署、Docker容器部署等
Stars: ✭ 541 (+39.07%)
Mutual labels:  webpack, flask
Docker Web Framework Examples
Example apps that demonstate how to use Docker with your favorite web frameworks.
Stars: ✭ 204 (-47.56%)
Mutual labels:  webpack, flask
Word2vec Spam Filter
Using word vectors to classify spam messages
Stars: ✭ 149 (-61.7%)
Mutual labels:  webpack, flask
Saas Base
SaaS base application (Flask, Vue, Bootstrap, Webpack)
Stars: ✭ 208 (-46.53%)
Mutual labels:  webpack, flask
React Hot Redux Firebase Starter
🌋 React + Redux + Firebase + Webpack + React Hot Loader 3 + React Router in one boilerplate
Stars: ✭ 375 (-3.6%)
Mutual labels:  webpack
Js Stack From Scratch
🛠️⚡ Step-by-step tutorial to build a modern JavaScript stack.
Stars: ✭ 18,814 (+4736.5%)
Mutual labels:  webpack
Alloy
Boilerplate for creating web applications in Go (golang)
Stars: ✭ 374 (-3.86%)
Mutual labels:  webpack
Preact Starter
Webpack3 boilerplate for building SPA / PWA / offline front-end apps with Preact
Stars: ✭ 384 (-1.29%)
Mutual labels:  webpack
Generator Jhipster
JHipster is a development platform to quickly generate, develop, & deploy modern web applications & microservice architectures.
Stars: ✭ 19,162 (+4825.96%)
Mutual labels:  webpack
Typescript Library Starter
Starter kit with zero-config for building a library in TypeScript, featuring RollupJS, Jest, Prettier, TSLint, Semantic Release, and more!
Stars: ✭ 3,943 (+913.62%)
Mutual labels:  webpack
Ykit
基于 Webpack 的灵活快速的打包工具,帮助稳定高效构建现代 JavaScript 应用。
Stars: ✭ 375 (-3.6%)
Mutual labels:  webpack
React Shopping Cart
Easily integrate React Shopping Cart into your existing website without using Redux.
Stars: ✭ 380 (-2.31%)
Mutual labels:  webpack
Mocker Api
mocker-api that creates mocks for REST APIs. It will be helpful when you try to test your application without the actual REST API server.
Stars: ✭ 374 (-3.86%)
Mutual labels:  webpack
Neutrino
Create and build modern JavaScript projects with zero initial configuration.
Stars: ✭ 3,844 (+888.17%)
Mutual labels:  webpack
Miox
Modern infrastructure of complex SPA
Stars: ✭ 374 (-3.86%)
Mutual labels:  webpack
React Mobx Typescript Boilerplate
A bare minimum frontend boilerplate with React 16.7, Typescript 3.2 and Webpack 4
Stars: ✭ 378 (-2.83%)
Mutual labels:  webpack
Invoice
增值税发票OCR识别,使用flask微服务架构,识别type:增值税电子普通发票,增值税普通发票,增值税专用发票;识别字段为:发票代码、发票号码、开票日期、校验码、税后金额等
Stars: ✭ 381 (-2.06%)
Mutual labels:  flask
Serverless Wsgi
Serverless plugin to deploy WSGI applications (Flask/Django/Pyramid etc.) and bundle Python packages
Stars: ✭ 377 (-3.08%)
Mutual labels:  flask

React News Board

Build: Passing License: GPLv2 Analytics

这是一个信息聚合阅读的项目,采用 Flask + React + Redux 的技术栈:

  • Flask 用于在后台提供 api 服务
  • React 用于构建 UI
  • Redux 用于数据流管理

本项目相关博文:实例讲解基于 Flask+React 的全栈开发和部署

目前项目已经实现了基本功能,界面大概如下:

home

Installation

$ git clone https://github.com/ethan-funny/react-news-board.git
$ cd react-news-board
$ pip install -r requirements.txt
$ cd client
$ npm install

其中,pip install -r requirements.txt 是安装 Python 的第三方库,也可使用 virtualenv 来安装,然后,进入到 client 目录,使用 npm 安装 Node 的相关模块。

Running

要让项目跑起来,需启动前端和后台。

后台

进入项目的根目录,执行下面命令:

react-news-board $ python manage.py runserver
 * Running on http://127.0.0.1:2345/ (Press CTRL+C to quit)
 * Restarting with stat
 * Debugger is active!
 * Debugger pin code: 201-208-541

前端

进入项目根目录下的 client 目录,执行 npm start 的命令,如下:

react-news-board $ cd client
react-news-board: client $ npm start

> [email protected] start /Users/Ethan/Documents/Code/react-news-board/client
> webpack-dev-server --progress

 70% 1/1 build modules[HPM] Proxy created: /api  ->  http://127.0.0.1:2345
 http://localhost:8080/
webpack result is served from /
content is served from /Users/Ethan/Documents/Code/react-news-board/client/public
404s will fallback to /index.html
 95% emitHash: 6ade44d13faadad08ce7
Version: webpack 1.13.3
Time: 16944ms
        Asset       Size  Chunks             Chunk Names
    bundle.js    5.07 MB       0  [emitted]  main
bundle.js.map    6.05 MB       0  [emitted]  main
   index.html  290 bytes          [emitted]

上面两部操作完成后,在浏览器打开 http://localhost:8080/ 即可看到效果。

Deploy

本项目的部署采用 nginx+gunicorn+supervisor 的方式,其中:

  • nginx 用来做反向代理服务器:通过接收 Internet 上的连接请求,将请求转发给内网中的目标服务器,再将从目标服务器得到的结果返回给 Internet 上请求连接的客户端(比如浏览器);
  • gunicorn 是一个高效的 Python WSGI Server,我们通常用它来运行 WSGI (Web Server Gateway Interface,Web 服务器网关接口) 应用(比如本项目的 Flask 应用);
  • supervisor 是一个进程管理工具,可以很方便地启动、关闭和重启进程等;

项目部署需要用到的文件在 deploy 目录下:

deploy
    ├── fabfile.py          # 自动部署脚本
    ├── nginx.conf          # nginx 通用配置文件
    ├── nginx_geekvi.conf   # 站点配置文件
    └── supervisor.conf     # supervisor 配置文件

本项目采用了 Fabric 自动部署神器,它允许我们不用直接登录服务器就可以在本地执行远程操作,比如安装软件,删除文件等。

在部署之前,我们应该先对前端的资源进行加载和构建,在 deploy 目录使用如下命令:

$ fab build

当然,你也可以直接到 client 目录下,运行命令:

$ npm run build

如果构建没有出现错误,就可以进行部署了,在 deploy 目录使用如下命令进行部署:

$ fab deploy

注意,请根据实际情况修改 fabfile.py 脚本的相关参数,比如服务器地址,用户名,服务器端口和项目路径等。

Contribute

如果你对本项目感兴趣的话,欢迎加入开发。

后台部分主要是爬虫,目前爬虫的站点只有 Github Trending, Hacker News,SegmentFault 和开发者头条等几个,稀土掘金,知乎日报(貌似有 api),简书等站点后续也会考虑。本项目的爬虫使用 Python,第三方库有 requests 和 lxml,爬虫要提取的内容主要有标题,时间和描述等,最后还会对它们进行格式化,以便提供给前端,这部分可以参考 server/spiders 目录下的爬虫文件。

前端部分还有不少需要完善和优化,比如支持滚动到底部进行分页加载,页面 CSS 美化等。

TODO

  • 稀土掘金
  • 知乎日报(或专栏等)
  • 支持滚动到底部进行分页加载

LICENSE

GPL-2.0

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].