GithubHelp home page GithubHelp logo

wechatrobot's Introduction

wechatrobot

环境搭建

  1. 首先安装pip 官网
    sudo apt-get install pip
  2. 利用pip来安装werobot
    pip install werobot
  3. 安装Nginx Nginx轻量级、性能强、占用资源少,能很好的处理高并发的反向代理软件。
    sudo apt-get install nginx
    配置Nginx,Ubuntu 上配置 Nginx 也是很简单,不要去改动默认的 nginx.conf 只需要将 /ext/nginx/sites-available/default 替换掉。新建一个default文件:
server {
	server_name example.com;
	listen 80;

	location / {
    	proxy_pass_header Server;
        proxy_redirect off;
        proxy_pass http://127.0.0.1:12233;
    	}
	}

更改配置还需要记得重启一下nginx:
sudo service nginx restart
4. 安装 Supervisor Supervisor可以同时启动多个应用,最重要的是,当某个应用Crash的时候,他可以自动重启该应用,保证可用性。
sudo apt-get install supervisor
Supervisor 的全局的配置文件位置在:
/etc/supervisor/supervisor.conf
正常情况下我们并不需要去对其作出任何的改动,只需要添加一个新的*.conf 文件放在
/etc/supervisor/conf.d/
下就可以,那么我们就新建立一个用于启动 my_flask 项目的 uwsgi 的 supervisor 配置 (命名为:my_flask_supervisor.conf):

[program:wechat_robot]
command = python /home/whtsky/robot.py
user = whtsky
redirect_stderr = true
stdout_logfile = /home/whtsky/logs/robot.log

启动服务 sudo service supervisor start
终止服务 sudo service supervisor stop

微信机器人WALLE

wechatrobot's People

Contributors

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