Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Jan 17 12:40
    troglotit starred ajnsit/wai-routes
  • Sep 28 2018 18:46
    noxecane commented #16
  • Sep 27 2018 06:53
    ajnsit assigned #12
  • Sep 27 2018 06:53
    ajnsit labeled #12
  • Sep 27 2018 06:52
    ajnsit commented #16
  • Sep 27 2018 06:52
    ajnsit labeled #16
  • Sep 26 2018 20:17
    noxecane opened #16
  • Aug 29 2018 11:11
    ajnsit commented #15
  • Aug 27 2018 23:33
    MichaelXavier commented #15
  • Aug 27 2018 23:32
    MichaelXavier synchronize #15
  • Aug 20 2018 17:42
    MichaelXavier commented #15
  • Aug 17 2018 17:01
    wangpengwen starred ajnsit/wai-routes
  • Aug 16 2018 17:49
    MichaelXavier opened #15
  • Aug 16 2018 17:03
  • Jul 04 2018 07:47

    ajnsit on master

    Add bounds for base in all the … (compare)

  • Jul 04 2018 05:32
    Travis ajnsit/wai-routes (master) canceled (261)
  • Jul 04 2018 05:32
    Travis ajnsit/wai-routes (v0.10.3) canceled (263)
  • Jul 04 2018 05:28
    Travis ajnsit/wai-routes (master) canceled (262)
  • Jul 04 2018 05:28

    ajnsit on master

    Try new travis script (compare)

  • Jul 04 2018 04:53

    ajnsit on v0.10.3

    (compare)

steven777400
@steven777400
I have a question about wai-routes, but I don't think it qualifies as an issue. I'm not sure if this is an ok place to ask questions or if it will even be seen... But if so, what I'm trying to do is host a wai routed application in a subdirectory (say /test/example.fcgi with URLs like /text/example.fcgi/w1/w2) where w1/w2 are the wai routes. It runs fine but when asking showRouteSub for the url I get just /w1/w2. I figure I need to use something like the Wai.Middleware.Approot but I'm not sure how to integrate that into the wai routes in the correct way.
Anupam Jain
@ajnsit
Hi, the behaviour looks correct. Since you are running the app as a cgi application, the path information received by the application would not include the path of the CGI executable itself.
I don't know the specifics of what you are trying to do, but using any middleware should be pretty easy.
When you are composing your app (i.e. where you have the code 'route <MasterDatatype>') simply add the line 'middleware (approotMiddleware <your approute function>)'
Anupam Jain
@ajnsit
the same for any other middleware, for example if you wish to hardcode the approute - 'middleware (harcoded "<your custom approute>")'
From within the handler, you can access the raw request with 'request' (not the most creative name I know). And then do whatever with it. So for example, get the approot with something like - 'request >>= getApproot'
Anupam Jain
@ajnsit
Also, feel free to open github issues even when you are not sure if the problem at hand is a wai-routes issue. I am still trying out the gitter chat thing and am not sure how well it works.
steven777400
@steven777400
OK that's what i did, thanks. Just wasn't sure if i was missing a better/more correct way. Thanks again.
Anupam Jain
@ajnsit
Sure, glad to be of help!