Code Monkey home page Code Monkey logo

jpush-docs's Introduction

JPush Docs

Get Started

  1. 安装 Python(Python 2.7 和 Python 3 都可以,推荐 Python 3)

  2. 安装 MKDocs

$ pip install mkdocs
  1. clone 代码到本地

  2. 同步 README(Windows 用户需在 Git 命令行环境下执行)

$ bash ./hooks/synreadme.sh
  1. 运行 MKDocs 测试服务器
$ mkdocs serve
  1. 使用浏览器访问:
http://127.0.0.1:8000/

Github Webhook

  1. 安装 Python 3

  2. 创建并激活虚拟环境 venv

$ python -m venv venv
$ . ./venv/bin/activate
  1. 安装依赖
$ pip install -r requirements.txt
  1. 复制配置文件
$ cp hooks/hooksrc.sample hooks/hooksrc
$ cp hooks/uwsgi.ini.sample hooks/uwsgi.ini
  1. 同步 README
$ bash ./hooks/synreadme.sh
  1. 使用服务器
  • 使用 Flask 自带服务器
$ python hooks/webhooks.py
  • 使用 uWSGI 作为服务器 ([]表示可选命令行参数)

需要把 uWSGI 的配置文件 hooks/uwsgi.ini 中的一行配置项 socket = 127.0.0.1:8080 改成 http-socket = 127.0.0.1:8080

$ uwsgi -i hooks/uwsgi.ini [ &>> uwsgi.log [&]]
  • 使用 Nginx 管理 uWSGI

需要保留 uWSGI 的配置文件 hooks/uwsgi.ini 中的 socket = 127.0.0.1:8080 配置项

  1. 使用浏览器访问(Flask 服务器和 uWSGI 服务器):
http://127.0.0.1:8080

返回 Hello World 则说明 github webhook 配置部署成功。

Contributing

  1. 同步 JPush 上游仓库的更新到自己的远端仓库
  2. 更新文档
  3. 提交文档到自己远端仓库
  4. Pull Request 到 JPush 上游仓库的 master 分支

MKDocs

本文档基于 Markdown 编写,使用 MKDocs 工具生成 HTML 布局与页面。

jpush-docs's People

Contributors

ahaaaaa avatar aoyunyun avatar cheney-cyh avatar darkterrorooo avatar fendouai avatar gointoit avatar hujl2017 avatar javenfang avatar kenchoi1992 avatar lhw5123 avatar liuduotao avatar nikowu avatar nocturnana avatar pikacode avatar raoxudong avatar shunyang avatar try2giveup avatar war22moon avatar wenqiuhua avatar xiaoma6guohe avatar xiepiaa avatar xiezefan avatar xiongtiancheng avatar yangkedj avatar zhangmeteor avatar zhangqinghe avatar

Watchers

 avatar  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.