jeffreyhorner / Rook

A web server interface for R
161 stars 30 forks source link

Rapache Rook package deployment #12

Closed jeroen closed 10 years ago

jeroen commented 11 years ago

Would it be possible to add an example in the manual of deploying a Rook app using rapache, where the Rook app function itself is defined in a separate package? Currently it states:

<Location /test/RookApp>
        SetHandler r-handler
        RFileEval /path/to/Rook/App/rookapp.R:Rook::Server$call(app)
</Location>

But I like to deploy my rook app in a package, rather than in a separate R script file.

jeffreyhorner commented 11 years ago

This should be doable by using*

REvalOnStartup "library(yourPackage)"

and then

<Location /your/app/name> SetHandler r-handler REval yourPackage::functionCall()

* in your apache conf. Note that it's up to your package and your function call on how you instantiate the Rook app and then execute the call method.

On Tue, Mar 12, 2013 at 2:45 PM, Jeroen notifications@github.com wrote:

Would it be possible to add an example in the manual of deploying a Rook app using rapache, where the Rook app function itself is defined in a separate package? Currently it states:

SetHandler r-handler RFileEval /path/to/Rook/App/rookapp.R:Rook::Server$call(app)

But I like to deploy my rook app in a package, rather than in a separate R script file.

— Reply to this email directly or view it on GitHubhttps://github.com/jeffreyhorner/Rook/issues/12 .