Giter Site home page Giter Site logo

Comments (9)

whtsky avatar whtsky commented on May 17, 2024

你是想微信机器人和网页共用一个域名?

如果是的话:
用 Nginx 作反代,把一个目录代理给 WeRoBot ,其他的代理给这个页面

如果不是的话:
直接把域名丢给哪个页面就好了啊

from werobot.

liuchang0812 avatar liuchang0812 commented on May 17, 2024

我在sina app 上使用, 假设地址是 :robot.sinaapp.com , 我希望使用werobot中的bottle解析 robot.sinaapp.com/hello ,应该怎么写呢

from werobot.

whtsky avatar whtsky commented on May 17, 2024

@liuchang0812 可以尝试用 Tornado 把两个 WSGI 应用 「粘」到一起:

import tornado.web
import tornado.wsgi
from robot import robot
from your_app import app

robot = tornado.wsgi.WSGIContainer(robot)
app = tornado.wsgi.WSGIContainer(app)
application = tornado.web.WSGIApplication([
    ('/robot', tornado.web.FallbackHandler, dict(fallback=robot)),
    ('.*', tornado.web.FallbackHandler, dict(fallback=robot)),
])

from werobot.

dalang avatar dalang commented on May 17, 2024

我试着采用@whtsky提到的方法来合并,提示TypeError: 'WeRoBot' object is not callable

from werobot.

whtsky avatar whtsky commented on May 17, 2024

= =
把第一个 WSGIContainer 那里的 robot 改成 robot.wsgi 吧……
@dalang

from werobot.

dalang avatar dalang commented on May 17, 2024

好像是应该robot.app。 谢谢你总是很及时的回复,big thanks @whtsky

from werobot.

whtsky avatar whtsky commented on May 17, 2024

@dalang 客气了≥﹏≤

from werobot.

whtsky avatar whtsky commented on May 17, 2024

@dalang 0.3.4 版本里改成 robot.wsgi 了

from werobot.

dalang avatar dalang commented on May 17, 2024

好的,谢谢你的提醒。我也会及时升级我的微信机器人。:-P
在 2013-4-13 下午5:27,"whtsky" [email protected]写道:

@dalang https://github.com/dalang 0.3.4 版本里改成 robot.wsgi 了


Reply to this email directly or view it on GitHubhttps://github.com//issues/3#issuecomment-16330228
.

from werobot.

Related Issues (20)

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.